Skip to content
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

[FEA] Series transpose #9605

Closed
beckernick opened this issue Nov 4, 2021 · 0 comments · Fixed by #9835
Closed

[FEA] Series transpose #9605

beckernick opened this issue Nov 4, 2021 · 0 comments · Fixed by #9835
Assignees
Labels
feature request New feature or request good first issue Good for newcomers Python Affects Python cuDF API.

Comments

@beckernick
Copy link
Member

beckernick commented Nov 4, 2021

For pandas API compatibility, we can implement transpose on Series in addition to the existing implementation on DataFrame. As a Series is a 1-D container, in pandas Series.transpose() returns the original Series.

import pandas as pds = pd.Series([0,1,2])
print(s)
print(s.transpose())
0    0
1    1
2    2
dtype: int64
0    0
1    1
2    2
dtype: int64

This is consistent with numpy semantics for 1-D arrays:

import numpy as nparr = np.arange(5)
np.array_equal(arr, arr.T), arr.__array_interface__["data"] == arr.T.__array_interface__["data"]
(True, True)
@beckernick beckernick added feature request New feature or request good first issue Good for newcomers Python Affects Python cuDF API. labels Nov 4, 2021
@mayankanand007 mayankanand007 self-assigned this Dec 2, 2021
@rapids-bot rapids-bot bot closed this as completed in #9835 Dec 7, 2021
rapids-bot bot pushed a commit that referenced this issue Dec 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request good first issue Good for newcomers Python Affects Python cuDF API.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants