-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
A way to solve ValueError: Inferred frequency None from passed values does not conform to passed frequency C #371
Comments
Thanks for sharing! create_returns_tear_sheet() now seems very slow for me though and gives me the following warnings.
|
@wukan1986 Is that related to pandas 1.0.0 or something else? |
@alexandrnikitin pandas>=0.25 |
It works , Thanks a lot! |
Thanks for sharing! I have another question while using resampling. resample.last() only keeps 1 row for each month, what if I have multiple rows for each month-end and I would like to keep all of them? |
df.resample().apply(lambda x:x.tail(2)) |
Thanks for your reply! In my understanding, tail(2) would keep the bottom two rows of a certain date, right? What if the data I have only contained month-end prices and factors and I would like to keep all of them. Say I have 1000 assets for 2000-01-31 and thousands of assets for other months as well. I don't think resample('M') would work in this way though. Please feel free to correct me. |
series.unstack().resample() |
@wukan1986
but the warning still arise: |
Thank you. This works for me. |
you can use date list to filter the date date that has freq=none, such as: than filter factors data by (factors data that not throw to alphalens): than it works using func "get_clean_factor_and_forward_returns()" |
price_df=price_df.resample('T').last() this works |
Works like a charm! Thank you! |
I find a way to solve the ValueError
I resample the date
The text was updated successfully, but these errors were encountered: