A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pandas-dev/pandas/issues/46252 below:

Period formatting directive %l (millisecond) and %u (microseconds) provide wrong results · Issue #46252 · pandas-dev/pandas · GitHub

Pandas version checks Reproducible Example
import pandas as pd

p = pd.period_range("2003-01-01 12:01:01.123456789", periods=2, freq="n")
Issue Description

p[0].strftime("millis: %l - micros: %u - nanos: %n")

yields 'millis: 789 - micros: 456789 - nanos: 123456789'

Expected Behavior

THe correct result should be 'millis: 123 - micros: 123456 - nanos: 123456789'

Installed Versions INSTALLED VERSIONS

commit : 2c23f48
python : 3.8.11.final.0
python-bits : 64
OS : Windows
OS-release : 10
Version : 10.0.19043
machine : AMD64
processor : Intel64 Family 6 Model 158 Stepping 10, GenuineIntel
byteorder : little
LC_ALL : None
LANG : None
LOCALE : fr_FR.cp1252
pandas : 1.5.0.dev0+420.g2c23f48ef2.dirty
numpy : 1.20.3
pytz : 2021.3
dateutil : 2.8.2
pip : 21.0.1
setuptools : 58.0.4
Cython : 0.29.24
pytest : 6.2.5
hypothesis : 6.29.3
sphinx : 4.2.0
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 3.0.1
IPython : 7.27.0
pandas_datareader: None
bs4 : 4.10.0
bottleneck : None
fastparquet : None
fsspec : None
gcsfs : None
markupsafe : 2.0.1
matplotlib : 3.4.2
numba : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pyreadstat : None
pyxlsb : None
s3fs : None
scipy : 1.7.1
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
zstandard : None


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4