You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for putting this package together. It has helped a lot.
I am working with time series dataframes and I've noticed that when performing join-operations with dataframes the type associated with some of the columns seem to change.
Here's an example:
I have two dataframes, each with two columns. The first one is a "date" column whose entries are Date values, the second one is the value-column of type Float64 where I get the value of the timeseries. In my example, I am looking to perform on inner-join between quarterly GDP and quarterly metal-usage, by joining on the "date" column.
The inner-join statement I use is: X_df = innerjoin(metal_usage_df, global_gdp_df, on = :date)
The GDP dataframe looks like:
date (type Date)
GDP (type Float64)
2020-10-01
22024.5
2021-01-01
22600.2
2021-04-01
23292.4
and it is inner-joined with the metal-usage DF, which looks like:
date (type Date)
metal-usage (type Float64)
2020-10-01
222.6
2021-01-01
212.1
2021-04-01
239.5
However, when printing out the inner-join df that I get, the GDP column now has a different type:
date (type Date)
metal-usage (type Float64)
GDP (type Any)
2020-10-01
222.6
22024.5
2021-01-01
212.1
22600.2
2021-04-01
239.5
23292.4
and this causes downstream issues for me. I was wondering what the root cause was for this and if there was a way for me to enforce column types during or before the inner-join operation?
Any help would be much appreciated!
The text was updated successfully, but these errors were encountered:
Hello,
Thank you for putting this package together. It has helped a lot.
I am working with time series dataframes and I've noticed that when performing join-operations with dataframes the type associated with some of the columns seem to change.
Here's an example:
I have two dataframes, each with two columns. The first one is a "date" column whose entries are Date values, the second one is the value-column of type Float64 where I get the value of the timeseries. In my example, I am looking to perform on inner-join between quarterly GDP and quarterly metal-usage, by joining on the "date" column.
The inner-join statement I use is:
X_df = innerjoin(metal_usage_df, global_gdp_df, on = :date)
The GDP dataframe looks like:
and it is inner-joined with the metal-usage DF, which looks like:
However, when printing out the inner-join df that I get, the GDP column now has a different type:
and this causes downstream issues for me. I was wondering what the root cause was for this and if there was a way for me to enforce column types during or before the inner-join operation?
Any help would be much appreciated!
The text was updated successfully, but these errors were encountered: