-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
PR: Support for all Pandas indexes in Variable Explorer #5149
Conversation
Hello @Prikers! Thanks for updating the PR.
Comment last updated on September 09, 2017 at 11:15 Hours UTC |
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.
Nice work @Prikers ! 👍, I left some minor comments about the tests but they are simple suggestions, I think the functionality by itself is ok :)
@@ -17,6 +17,7 @@ | |||
import os | |||
|
|||
# Third party imports | |||
import pandas |
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.
Maybe could you import the classes for the indexes in the next line and not import all pandas?
""" Creates a dictionnary of many possible pandas indexes """ | ||
return { | ||
'Index': pandas.Index(list('ABCDEFGHIJKLMNOPQRST')), | ||
'RangeIndex': pandas.RangeIndex(0, 20), |
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.
If the import change is done then you should delete the pandas.
to call the indexes classes here.
|
||
def test_dataframeeditor_with_various_indexes(): | ||
for rng_name, rng in generate_pandas_indexes().items(): | ||
rng = rng[:3] |
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.
Maybe instead of taking only the first 3 elements you could take all the elements and then assert the first three and the last one.
Thank you for the kind words @ccordoba12 and @dalthviz! Indeed it takes me some time to navigate through the code 😆 but that helps me learning a lot! |
Fixes #3758
Hi team,
This is a proposal in order to solve #3758.
In addition to the support of pandas
DatetimeIndex
(#3849) in the Variable Explorer it is possible to support all pandasIndexes
.Results are exactly the same as before for
DatetimeIndex
and very similar for all other types (RangeIndex
,MultiIndex
,CategoricalIndex
, etc.).