-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
pd.Timestamp.isoformat does not implement keyword timespec #26131
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
One thing to note is that if we mirror |
Might be helpful to have a test checking compatibility of all the signatures between datetime vs timestamp. |
I have another remark : the help message is very different when looking at the Timestamp class or at the instance : import pandas as pd help(pd.Timestamp.isoformat)
help(pd.Timestamp(2019).isoformat)
|
update this apli, please |
@77QingLiu |
Hello, I am still having this same issue. |
@boringow this is an open issue |
How can I do a PR in this issue? can someone assign it to me please? |
@phofl Hi again and sorry to bother, I need to be a triage member to do PR. How can I become one? |
Everyone can open a Pull Request. I think you did one a few days back? |
@phofl sorry, I could no do it from the mobile. I do it right now. Can you asign this task to me so I deal with it? Although I do not know git/github I have experiences with pandas and developing and I think I can solve it. |
Assigned it to you. You can self assign through posting take in the future |
Okay, I need some help in here as I am lacking some knowledge.
To start, the keyword ' timespec ' is not defined, only the keyword 'sep' is defined, as the documentation indicates, but it is also not working.
TypeError: isoformat() argument 1 must be a unicode character, not str. If we see the .isoformat method ( pandas/pandas/_libs/tslibs/timestamps.pyx Line 548 in d558bce
We will always get the base, as nanoseconds from a timestamp.now() will always be zero. How does pandas handle nanoseconds but datetime does not? I think the error is in there, But I need help. |
The PR for issue #38550 was closed as stale. review comments there could be useful. contributions welcome |
Code Sample
[IN]
[OUT]
Help on method isoformat in module pandas._libs.tslibs.timestamps:
[IN]
[OUT]
---------------------------------------------------------------------------
[IN]
[OUT]
'2019-04-18T07:38:50+00:00'
Problem description
The help method has given me the feeling that I can use timespec just like I can with standard datetime objects (since python 3.6).
Expected Output
We could mimic standard datetime.isoformat behavior, or at least remove this false information from the help message.
Output of
pd.show_versions()
INSTALLED VERSIONS
commit: None
python: 3.7.3.final.0
python-bits: 64
OS: Windows
OS-release: 10
machine: AMD64
processor: Intel64 Family 6 Model 142 Stepping 9, GenuineIntel
byteorder: little
LC_ALL: None
LANG: fr_FR.UTF-8
LOCALE: None.None
pandas: 0.24.2
pytest: 4.4.1
pip: 19.0.3
setuptools: 41.0.0
Cython: None
numpy: 1.16.2
scipy: 1.2.1
pyarrow: None
xarray: None
IPython: 7.4.0
sphinx: 2.0.1
patsy: 0.5.1
dateutil: 2.8.0
pytz: 2019.1
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: 3.0.3
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml.etree: 4.3.3
bs4: 4.7.1
html5lib: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.10.1
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
gcsfs: None
The text was updated successfully, but these errors were encountered: