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
Enhance Grain adding Semester #99
Comments
This functionality is currently not supported in pandas. See pandas-dev/pandas#22362. There is no easy workaround using Any suggestions on workarounds welcome. |
I think another use case for this (and possibly more widely needed?) is selecting half year. Many reports require division in to half year (I am working on a few atm) - the functionality could be modelled on quarter , defining the month start for the half year (which would probably coincide with financial year ends, product launches, drug authorizations etc.). As previously noted, we cannot use a frequency of 2Q , because if there happens to be no data in January, but some in Feb it will start the 2 quarter period in February. It seems to be quite a big bit of functionality to be missing given the richness of the time period specification as a whole. |
I believe this is already available in the latest release |
Confirmed that Does it make more sense to use |
Maybe support both H and S so as to avoid a deprecation. Both are suboptimal since S is reserved for seconds and H for hours in the datetime module. As labeling goes, your suggestion is a good one. |
Could use 'h' for half year ? That is not used in strftime or groupby frequencies |
I agree that H more visually pleasing. A new version is coming! If Sorry I don't have example code here to show, since there's no sample data that is at the monthly or quarterly level origin grain. |
The prism dataset is monthly |
Oh yes! Thanks! import pandas as pd
import chainladder as cl
prism = cl.load_sample("prism")
prism["Incurred"].sum().grain("OHDM")
prism["Incurred"].sum().grain("OSDM") These should all work. I also tested some weird mutation and didn't get anything unexpected back. |
Would be a good enhancement add the semester into the grain.
The text was updated successfully, but these errors were encountered: