Pandas version checks
- [x] I have checked that the issue still exists on the latest versions of the docs on
main
here
Location of the documentation
https://pandas.pydata.org/docs/dev/reference/api/pandas.Series.html
Documentation problem
dtype : str, numpy.dtype, or ExtensionDtype, optional
Data type for the output Series. If not specified, this will be
inferred from `data`.
See the :ref:`user guide <basics.dtypes>` for more usages.
If ``data`` is Series then is ignored.
The last line here is incorrect. specifying a dtype will override the default behavior. See this example
>>> import pandas as pd
>>> ser = pd.Series([1,2,3])
>>> ser
0 1
1 2
2 3
dtype: int64
>>> pd.Series(ser, dtype=float)
0 1.0
1 2.0
2 3.0
dtype: float64
Suggested fix for documentation
Just remove that line