-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC: Remove Series.view(dtype=None) always trying float64 #20281
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
ok, this is fine, though we should simply deprecate this. |
I don't think this function is going to be used a lot, but I wouldn't mind leaving it there instead of deprecating it. I'm specially in favor of the second solutution (if dtype is None to set dtype = self.dtype) |
@villasv see my comment son the other issue having extra functions is plain confusing and just adds technical debt |
Sound arguments, I'm in favor of keeping it but not specially attached to it. I won't miss it if it's gone. I'll try to keep discussions in the other issue only. |
Looks like this respects the original dtype now, so maybe just need to update the docs |
We can indeed certainly fix the docs, but IMO we should just deprecate it as well -> #20251 |
The |
xref https://github.com/pandas-dev/pandas/pull/20220/files#r173655704
Currently,
Series.view()
is actually equivalent toSeries.view('float64')
(because that is the default dtype in the Series constructor) which often does not make sense. Not too important (as there are not many reasons to use this function in pandas), but I think we should fix to either a) disallowdtype=None
or either b) if dtype is None to setdtype = self.dtype
(behaviour of numpy if no dtype is specified)The text was updated successfully, but these errors were encountered: