-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Int64Index and Float64Index (and... ?) do not propagate name of passed index #12309
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
Comments
Related question: are the following behaviours, currently in master, desired?
|
@toobaz no those are as expected, these by default will coerce to I dont think its ever useful to have a |
Not sure I understood correctly: OK for coercing to 64 bits both floats and ints by default. But what about a different, explicit, coercion (i.e. |
I am saying it exists for both now, but doesn't make sense for either. IIRC I added this for ints, but don't really remember why it was needed. Ideally we should just drop this support as its uncessary and confusing, coercing things like |
OK, so the |
its for compatibility and assertions (IOW if you pass something and it cannot be coerced then you raise, this already happens now) |
So for instance in |
no I would simply cast to |
@toobaz Is this related, or a new issue? In [8]: s2=pd.Series(2., index=pd.PeriodIndex(start='1995-01-02', end='2016-06-30', freq='B', name='date'))
In [10]: s1=pd.Series(3., index=pd.PeriodIndex(start='1995-01-02', end='2016-06-03', freq='B', name='date'))
In [12]: s3=s1*s2
In [13]: s3
Out[13]:
1995-01-02 6.0
1995-01-03 6.0
1995-01-04 6.0
1995-01-05 6.0
...
2016-06-28 NaN
2016-06-29 NaN
2016-06-30 NaN
Freq: B, dtype: float64
In [14]: s3.index.name
#none |
@MaximilianR same bug (not that I have perfectly clear the code paths, but it behaves fine in my branch) |
@toobaz so just add this as a test in your PR |
@jreback I thought you didn't want that PR to grow too much :-) Seriously: I don't have clear the code path leading to |
oh, right this is about Periods. If it works, just include the addtl test. Periods are a little bit in flux now. |
Float64Index
as wellideally move the tests to
Base
to test all index types.See #12288.
The text was updated successfully, but these errors were encountered: