-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dataframe with cftime issues #107
Comments
It has to do with the index being a cftime object rather than pd.Timestamp. from negi_stuff.modules import koalas as kl
kl.check_transform_cftime_dim_2_timestamp(df_with_cftime) |
@daliagachc now it works with cftime.DatetimeNoLeap, but not cftime.Datetime360Day.. |
hi! i went into the file but im not sure where the error occurs. could you create a small notebook where you open a dataframe with cftime.Datetime360Day so that i can debug? |
ok. now its fixed. the problem was that if cftime.Datetime360Day, then values like (2019,2,30) are allowed but that makes no sense in pd.Timestamp so we set it to 15 days to be in the middle and avoid the error. new_df = kl.check_transform_cftime_dim_2_timestamp(_dsUKESM, middle_of_month=True) make sure to update negi_stuff. new_df = new_df.resample('M').mean() |
Great, now it works! Thank you so much! |
here is an example to reproduce the issue
https://abisko.uiogeo-apps.sigma2.no/user/a23bf869-f10d-4e06-b63a-3b201c67dda6/lab/tree/Arctic_haze.ipynb
The text was updated successfully, but these errors were encountered: