We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
ages = [20, 22, 25, 27, 21, 23, 37, 31, 61, 45, 41, 32] bins = [18, 25, 35, 60, 100] cats = pd.cut(ages, bins) print(repr(cats))
This outputs
[(18, 25], (18, 25], (18, 25], (25, 35], (18, 25], ..., (25, 35], (60, 100], (35, 60], (35, 60], (25, 35]] Length: 12 Categories (4, object): [(18, 25] < (25, 35] < (35, 60] < (60, 100]]
The first line has 106 characters. This is a bad user experience for shell users with 80-character-wide terminals
in the first line
[(18, 25], (18, 25], (18, 25], (25, 35], (18, 25], ..., (25, 35], (60, 100], (35, 60], (35, 60], (25, 35]]
or
[(18, 25], (18, 25], (18, 25], ..., (35, 60], (35, 60], (25, 35]]
pd.show_versions()
pandas 0.19.2
The text was updated successfully, but these errors were encountered:
The categories output spills over too
In [22]: data = np.random.randn(1000) In [23]: pd.qcut(data, [0, 0.1, 0.5, 0.9, 1.]) Out[23]: [(-1.245, 0.0321], (-1.245, 0.0321], (-1.245, 0.0321], (-1.245, 0.0321], (-1.245, 0.0321], ..., (0.0321, 1.286], (-1.245, 0.0321], (0.0321, 1.286], (0.0321, 1.286], (0.0321, 1.286]] Length: 1000 Categories (4, object): [[-3.285, -1.245] < (-1.245, 0.0321] < (0.0321, 1.286] < (1.286, 3.117]]
Sorry, something went wrong.
dupe of #12066
Funny. Thanks
No branches or pull requests
Code Sample, a copy-pastable example if possible
Problem description
This outputs
The first line has 106 characters. This is a bad user experience for shell users with 80-character-wide terminals
Expected Output
in the first line
or
Output of
pd.show_versions()
pandas 0.19.2
The text was updated successfully, but these errors were encountered: