Skip to content

Nested list multi index (#14467) #32812

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

Closed

Conversation

harri471
Copy link

@pep8speaks
Copy link

pep8speaks commented Mar 18, 2020

Hello @harri471! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 12:1: E302 expected 2 blank lines, found 1
Line 14:3: E111 indentation is not a multiple of four
Line 17:23: E128 continuation line under-indented for visual indent
Line 17:43: E226 missing whitespace around arithmetic operator
Line 18:23: E128 continuation line under-indented for visual indent
Line 18:46: E226 missing whitespace around arithmetic operator
Line 21:23: E128 continuation line under-indented for visual indent
Line 21:43: E226 missing whitespace around arithmetic operator
Line 22:23: E128 continuation line under-indented for visual indent
Line 22:46: E226 missing whitespace around arithmetic operator
Line 25:3: E111 indentation is not a multiple of four
Line 27:50: E226 missing whitespace around arithmetic operator
Line 29:23: E128 continuation line under-indented for visual indent
Line 29:43: E226 missing whitespace around arithmetic operator
Line 30:23: E128 continuation line under-indented for visual indent
Line 33:23: E128 continuation line under-indented for visual indent
Line 33:43: E226 missing whitespace around arithmetic operator
Line 34:23: E128 continuation line under-indented for visual indent
Line 34:46: E226 missing whitespace around arithmetic operator
Line 37:3: E111 indentation is not a multiple of four
Line 40:7: E111 indentation is not a multiple of four
Line 41:25: E128 continuation line under-indented for visual indent
Line 41:45: E226 missing whitespace around arithmetic operator
Line 42:25: E128 continuation line under-indented for visual indent
Line 42:48: E226 missing whitespace around arithmetic operator
Line 42:62: W292 no newline at end of file

Comment last updated at 2020-03-20 19:22:20 UTC

# This conversion should be safe to do, as the input expects an Index
# and the colums are left unmodified throughout the rest of this function.
columns = ensure_index(columns)
if len(columns) != content_length:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you just combine this check with the one above so you can reuse the same error message?

https://github.com/pandas-dev/pandas/issues/14467
'''

class TestNestedListDataMultiIndex:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of creating a new file, could you put these tests in an existing file like pandas/tests/frame/test_constructor.py

@mroeschke mroeschke added Constructors Series/DataFrame/Index/pd.array Constructors DataFrame DataFrame data structure labels Mar 19, 2020
@mroeschke
Copy link
Member

@harri471 do you have time do merge in master and address the review comments?

@jreback
Copy link
Contributor

jreback commented Jun 14, 2020

closing as stale. pls ping if you want to continue / open a new PR.

@jreback jreback closed this Jun 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Constructors Series/DataFrame/Index/pd.array Constructors DataFrame DataFrame data structure
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dataframe constructor misinterprets columns argument if nested list is passed in as the data parameter.
4 participants