-
Notifications
You must be signed in to change notification settings - Fork 358
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
Fixed ks.Index.to_series() to work properly with name paramter #1643
Conversation
The existing test code below has been passing even though the name was not changed properly. self.assert_eq(kidx.to_series(name="a"), pidx.to_series(name="a")) >>> kidx.to_series(name="a")
0 0
1 1
3 3
5 5
6 6
8 8
9 9
9 9
9 9
Name: 0, dtype: int64
>>> pidx.to_series(name="a")
0 0
1 1
3 3
5 5
6 6
8 8
9 9
9 9
9 9
Name: a, dtype: int64 For now, I addressed it with |
What if ks.Index([1, 2, 3], name=‘a’).to_series() ? |
Oh, I think we should manage it, too. Just addressed it, Thanks! :) FYI: >>> pd.Index([1, 2, 3], name="a").to_series() # example of pandas
a
1 1
2 2
3 3
Name: a, dtype: int64
>>> ks.Index([1, 2, 3], name="a").to_series() # example of Koalas
a
1 1
2 2
3 3
Name: 0, dtype: int64 # TODO: the name of Series also should be "a" which is the same name with index |
Anyway, could you help me to solve this mypy failure when you available ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise, LGTM.
The existing
ks.Index.to_series()
work not properly withname
parameter(Although Its test was passed !)
This PR addressed it.