Skip to content

BUG: DataFrame(ndarray, dtype=categoricaldtype) #38857

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

Merged
merged 7 commits into from
Jan 2, 2021

Conversation

jbrockmendel
Copy link
Member

  • closes #xxxx
  • tests added / passed
  • passes black pandas
  • passes git diff upstream/master -u -- "*.py" | flake8 --diff
  • whatsnew entry

Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

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

lgtm. let's just re-run ci again

# mixed
df = DataFrame([Categorical(list("abc")), list("def")])
expected = DataFrame(
{0: Series(list("abc"), dtype="category"), 1: list("def")}, columns=[0, 1]
)
tm.assert_frame_equal(df, expected)

def test_construct_from_listlikes_mismatched_lengths(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

may pay to split out this test file as getting kind of big

Copy link
Member Author

Choose a reason for hiding this comment

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

ive been thinking that myself. will address before long

@jreback jreback added this to the 1.3 milestone Dec 31, 2020
@jreback jreback added Categorical Categorical Data Type Constructors Series/DataFrame/Index/pd.array Constructors labels Dec 31, 2020
@jreback jreback closed this Dec 31, 2020
@jreback jreback reopened this Dec 31, 2020
@jbrockmendel
Copy link
Member Author

this broke some things locally, am troubleshooting now

Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

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

lgtm. can you merge master as i think the tests are now moved

@jbrockmendel
Copy link
Member Author

rebased + green

@jreback jreback merged commit d642b67 into pandas-dev:master Jan 2, 2021
@jbrockmendel jbrockmendel deleted the ref-construction-cat branch January 2, 2021 02:17
luckyvs1 pushed a commit to luckyvs1/pandas that referenced this pull request Jan 20, 2021
* BUG: DataFrame(ndarray, dtype=categoricaldtype)

* whatsnew

* GH ref

* elif->if
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Categorical Categorical Data Type Constructors Series/DataFrame/Index/pd.array Constructors
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants