Skip to content

floats and ints missing as acceptable arguments for pandas.to_datetime in API Reference #14556

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

Closed
radekholy24 opened this issue Nov 2, 2016 · 6 comments · Fixed by #14864
Closed
Labels
Milestone

Comments

@radekholy24
Copy link

A small, complete example of the issue

http://pandas.pydata.org/pandas-docs/version/0.19.0/generated/pandas.to_datetime.html says:

arg : string, datetime, list, tuple, 1-d array, Series

While http://pandas.pydata.org/pandas-docs/version/0.19.0/timeseries.html#epoch-timestamps says that ints and floats are accepted as well.

Expected Output

int and float to be in the list

Output of pd.show_versions()

pandas: 0.19.0
INSTALLED VERSIONS
------------------
commit: None
python: 3.5.2.final.0
python-bits: 64
OS: Linux
OS-release: 4.4.0-45-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8

pandas: 0.19.0
nose: None
pip: 7.1.0
setuptools: 18.0.1
Cython: None
numpy: 1.11.2
scipy: None
statsmodels: None
xarray: None
IPython: None
sphinx: None
patsy: None
dateutil: 2.5.3
pytz: 2016.7
blosc: None
bottleneck: None
tables: None
numexpr: None
matplotlib: None
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: None
boto: None
pandas_datareader: None
@jorisvandenbossche
Copy link
Member

That is correct. Pull request to update the docstring is very welcome!

@souravsingh
Copy link

I would like to work on the issue. Which files need updating?

@jorisvandenbossche
Copy link
Member

you need to look for the source of the to_datetime function, this is located in tseries/tools (you can inspect the function to see that, just type pd.to_datetime in a console)

@patniharshit
Copy link
Contributor

I would like to take this up. Just one doubt that I have to just update the doc string of to_datetime function to include integer and float as well ?

@jreback
Copy link
Contributor

jreback commented Dec 11, 2016

yep

@patniharshit
Copy link
Contributor

First pull request in the world of open source. Guide me if anything is wrong.

@jreback jreback added this to the 0.19.2 milestone Dec 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants