-
Notifications
You must be signed in to change notification settings - Fork 909
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
fix TimeSeries.pd_series not retaining original name #2102
fix TimeSeries.pd_series not retaining original name #2102
Conversation
By directly accessing to the `components.array` attribute from the TimeSeries instance, I do not have to convert the `components` attribute to a list anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @fmerinocasallo, thanks for this fix and the well structured issue 🚀
Just a minor suggestion, then we can merge :)
As suggested by @dennisbader, we can directly access the items in the `components` attribute from the TimeSeries instance, no need to use the `components.array` attribute. Co-authored-by: Dennis Bader <[email protected]>
Hey @dennisbader, thanks for your suggestion! 😄 You are absolutely right. For some unknown reason, I assumed we could not directly access items in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great now, thanks @fmerinocasallo 🚀
You can reformat the code with black to resolve the failing lint check. Also if you plan on contributing more in the future, you could also set up the pre-commit hooks described in our CONTRIBUTING.md that will automatically check and reformat the code |
I reformatted the code with black to resolve the failing link check, as instructed. However, there are a couple of tests that are still not successful. Is there something else I can do on my side to resolve this? |
Hi @fmerinocasallo, yes there is one unit test failing. This is usually expected when changing something. Can you try to fix it? If you need help let us know. |
I am sorry to bother you again, but I am afraid I could use some help to fix that unit test failing, as I do not know how to proceed 😅 I would appreciate if you continue pointing me on the right direction 🙏 This way, I can learn to fix it by myself and do it autonomously next time. |
For sure. Generally when contributing, you can set up your dev environment as described here (points 1 - 6). For testing, you can run all unit tests from bash and the darts repository root (or just use your IDE):
For a specific file, you can run (that is the file which has the failing test):
You can inspect also the failing tests here on github actions. Then, try to analyze what's going wrong in the test (
Hope this helps |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @fmerinocasallo and thanks again for the contribution. 🚀 💯
I pushed to fix to the failing unit test, since we want to make a patch release soon.
If you want, you can check out what I did in my latest commits to see how I normally do this (in case you want to contribute more in the future :) ).
Thanks for your patience and assistance, @dennisbader :) I am sorry for my slow progress on this front 😓 I have checked out your latest commits and understood the issue regarding the row indices of static cov dataframes I was struggling with. I thought the series.quantile_timeseries() was supposed to add the string literal I will keep an eye on the project in case I can continue to contribute in the future 😉 |
Fixes #2101.
Summary
In this new version of the
TimeSeries.pd_series
method, the newly createdPanda.Series
instance to be returned takes as its name the one from theTimeSeries
object (stored as the first item in the iterable attributeself.components
).Other Information
This new version of the
TimeSeries.pd_series
method returns a newPandas.Series
instance with the name of the originalTimeSeries
object (series
).