Skip to content

DISP: show column dtype in DataFrame.info() output #5682

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
2 commits merged into from
Jan 1, 2014
Merged

DISP: show column dtype in DataFrame.info() output #5682

2 commits merged into from
Jan 1, 2014

Conversation

cpcloud
Copy link
Member

@cpcloud cpcloud commented Dec 12, 2013

closes #3429.

Old:

In [39]: DataFrame(randn(10,2)).info()
<class 'pandas.core.frame.DataFrame'>
Int64Index: 10 entries, 0 to 9
Data columns (total 2 columns):
0    10  non-null values
1    10  non-null values
dtypes: float64(2)

New:

In [39]: DataFrame(randn(10,2)).info()
<class 'pandas.core.frame.DataFrame'>
Int64Index: 10 entries, 0 to 9
Data columns (total 2 columns):
0    10 non-null float64
1    10 non-null object
dtypes: float64(1), object(1)

@ghost
Copy link

ghost commented Dec 12, 2013

👍

@jreback
Copy link
Contributor

jreback commented Dec 12, 2013

@cpcloud can you put an example of old and new up in the descr...

@ghost ghost assigned cpcloud Dec 12, 2013
@cpcloud
Copy link
Member Author

cpcloud commented Dec 12, 2013

sure thing

@cpcloud
Copy link
Member Author

cpcloud commented Dec 14, 2013

@y-p @jreback merge on passing?

@jreback
Copy link
Contributor

jreback commented Dec 14, 2013

I think their is an issue about adding the info method to Series, so maybe make a quick test method that assets that it raises (and ref this issue) - because series doesn't have a dtypes method (and this needs a modification for this change)

@cpcloud
Copy link
Member Author

cpcloud commented Dec 14, 2013

ok

@ghost
Copy link

ghost commented Dec 14, 2013

0.14 starts next week, honor the bug-fix only period?

@cpcloud
Copy link
Member Author

cpcloud commented Dec 14, 2013

@y-p ahh yes... sorry. merge after 0.13 rls

@ghost
Copy link

ghost commented Dec 14, 2013

It's clear nothing could possibly go wrong with something as simple as this. We've been there before... :)

@cpcloud
Copy link
Member Author

cpcloud commented Dec 14, 2013

@jreback

and this needs a modification for this change

not sure what u mean

@jreback
Copy link
Contributor

jreback commented Dec 15, 2013

what I mean is that the implementation would break for an info method on series (which doesn't exists at the moment)

so I think that you should have a test of this method that assert raises with a series for attribute error

@cpcloud
Copy link
Member Author

cpcloud commented Dec 15, 2013

Yep ok that's what I thought. Test is there.

On Sunday, December 15, 2013, jreback wrote:

what I mean is that the implementation would break for an info method on
series (which doesn't exists at the moment)

so I think that you should have a test of this method that assert raises
with a series for attribute error


Reply to this email directly or view it on GitHubhttps://github.com//pull/5682#issuecomment-30606978
.

Best,
Phillip Cloud

@ghost
Copy link

ghost commented Dec 30, 2013

@jreback , can I merge this or is it pending #5167?

@jreback
Copy link
Contributor

jreback commented Dec 30, 2013

i think this is fine

ghost pushed a commit that referenced this pull request Jan 1, 2014
DISP: show column dtype in DataFrame.info() output
@ghost ghost merged commit 3246267 into pandas-dev:master Jan 1, 2014
@ghost
Copy link

ghost commented Jan 1, 2014

Thanks @cpcloud. You used to be a code fountain not that long ago, did RL catch up with you? :)

will add release notes.

@cpcloud
Copy link
Member Author

cpcloud commented Jan 1, 2014

Got a job where I don't use Python. Had to put my pandas love on the back burner while I refamiliarize myself with C++ and learn a bunch of windows OS material. Not a whole lot of time on Linux. It brings me to tears occasionally. I'll try to at least bring it to a trickle in the coming months.

@ghost
Copy link

ghost commented Jan 1, 2014

please. trickle. :)

@ghost
Copy link

ghost commented Jan 1, 2014

if you're in microsoft land, LINQ and Rx are quite beautiful...

@cpcloud
Copy link
Member Author

cpcloud commented Jan 1, 2014

I can add those release notes tomorrow if you don't beat me to it. Otherwise, much appreciated.

@ghost
Copy link

ghost commented Jan 1, 2014

Done 10 minutes ago, don't worry about it.

@cpcloud cpcloud deleted the display-column-dtypes branch January 29, 2014 14:04
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

df summary view should show dtype associated with column, not just overall counts.
2 participants