-
Notifications
You must be signed in to change notification settings - Fork 750
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
PandasDataset
slow at creating when many large DataFrame
s are given
#2147
Comments
my suggestion is to just use the index even if it is regular or irregular without converting it to period and then back to time ranges.... as far as I can tell with pandas dataframe one already has the index for each time point so you can use the irregular time series approach... |
A workaround for my example above would be to have a constructor option that disables the check, and have an alternative constructor My example above is really about constructing a cc @rsnirwan |
@lostella yes... I believe so... so just use the index directly and as you can see it all works without going back to period and date range again... |
Description
The
PandasDataset
class is slow at constructing when several large DataFrames are given. It appears like this check is to be blamed.To Reproduce
The following snippet takes something like 14 seconds to run on my machine:
What I tried
Changing the definition of
is_uniform
todrastically reduces the runtime. However, this doesn't work with irregular offsets like
MonthEnd
(in fact, a test using3M
frequency fails): turningMonthEnd
periods to timestamp makes their difference become irregular in terms of days:The text was updated successfully, but these errors were encountered: