Am I overlooking something super obvious here? Where are these different types?
If you want to reproduce, here is the link to the csv I’m reading: timeseries_0.csv - Google Drive
Operations like transform, select, etc. ungroup a GroupedDataFrame by default and return a normal DataFrame. If you want to retain the grouping, provide the keyword ungroup=false.
From the docstring of transform:
• ungroup::Bool=true : whether the return value of the operation on gd should be a data frame or a
GroupedDataFrame.
This is unrelated in this case. timeseries is a DataFrame, because you read it in as a DataFrame with CSV.read. The fact that you later run transform! on it does not affect the fact that timeseries is bound to a DataFrame. Running a function on some value does not change a binding of a name to a value that you made earlier.
The same case is with gdf. You bind this name to the return value of groupby which is GroupedDataFrame. The fact that you run transform! later does not matter here.
However the return value of transform! in both cases is DataFrame as @skleinbo noted (unless ungroup kwarg is passed).
It does ungroup in both cases as I have commented above. But the design of Julia is such that it does not affect the bindings of names to values that you do before running transform!.