Skip to content

Conversation

ghost
Copy link

@ghost ghost commented Jul 27, 2021

…with a non-unique datetime index.

@ghost
Copy link
Author

ghost commented Jul 27, 2021

I spent some time to look at the original ticket and testing out some of the scenarios mentioned in pandas==0.25.0 and master.

It looks like only in the exact reported example would an error appear in 0.25.0:

  1. Drop Empty List on Index - Returns Same DataFrame [Passed]
  2. Drop Empty List on Non-Unique Index - Returns Same DataFrame [Passed]
  3. Drop Empty List on DateTimeIndex - Returns Same DataFrame [Passed]
  4. Drop Empty List on Non-Unique DateTimeIndex - "TypeError: 'NoneType' object is not iterable" [Failed]

There was no difference between dropping using an empty list vs. empty datetimeindex. However, I decided to test both because list-like values are supported and although a list is the most simple the example used a datetimeindex.

Like mentioned, this is now fixed on master.

I only wrote a test for [3], the very specific scenario in which the Bug was reported. But let me know if anyone thinks we should add more of these scenarios.

@ghost
Copy link
Author

ghost commented Jul 27, 2021

Looks like there are some failures on 'Checks' - 'Running doctests'

FAILED pandas/io/formats/style_render.py::pandas.io.formats.style_render.StylerRenderer.format
FAILED pandas/io/formats/style_render.py::pandas.io.formats.style_render._parse_latex_table_styles

I don't think it's related to my Pull Request but going to take a look to see why it's failing or if there's an Open Issue.

@phofl
Copy link
Member

phofl commented Jul 27, 2021

Yeah they are unrelated

@jreback jreback added this to the 1.4 milestone Jul 28, 2021
@jreback jreback added Indexing Related to indexing on series/frames, not to indexes themselves Reshaping Concat, Merge/Join, Stack/Unstack, Explode Testing pandas testing functions or related to the test suite labels Jul 28, 2021
@jreback jreback merged commit 1a13f0d into pandas-dev:master Jul 28, 2021
@jreback
Copy link
Contributor

jreback commented Jul 28, 2021

thanks @mikephung122

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Indexing Related to indexing on series/frames, not to indexes themselves Reshaping Concat, Merge/Join, Stack/Unstack, Explode Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants