-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
BUG: pd.tseries.frequencies.to_offset() does not really provide a DateOffset object #34381
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
Why would you expect this? the |
@jbrockmendel if it is less efficient why it was not depricate? I was very confused by the different behaviour of DateOffset objects. I think there should not be several DateOffset objects available. To answer your question: If I am calling the function
|
I'd be fine with this if you'd like to make a PR. |
Next week I can have a closer look to pandas source code to prepare a PR. I have learned that it is a huge effort to make it accurate for such a big project. I hope some other guys will join |
Uh oh!
There was an error while loading. Please reload this page.
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
(optional) I have confirmed this bug exists on the master branch of pandas.
Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.
Code Sample, a copy-pastable example
Problem description
The function
pd.tseries.frequencies.to_offset
does not really provide aDateOffset
object. As I understand the code right there are several types of DateOffsets e.g. Minutes, Seconds that are not compareable with the DateOffset object because they are having different properties.Expected Output
One Unified pd.DateOffset Object with same properties for all inherit Objects like Minutes and Seconds
Output of
pd.show_versions()
[INSTALLED VERSIONS
commit : None
python : 3.6.9.final.0
python-bits : 64
OS : Linux
OS-release : 4.15.0-99-generic
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : de_DE.UTF-8
LOCALE : de_DE.UTF-8
pandas : 1.0.3
numpy : 1.16.0
pytz : 2018.9
dateutil : 2.8.1
pip : 20.0.2
setuptools : 44.0.0
Cython : 0.28.3
pytest : 4.3.0
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : 4.2.1
html5lib : 0.999999999
pymysql : 0.9.3
psycopg2 : 2.8.4 (dt dec pq3 ext lo64)
jinja2 : 2.10
IPython : 7.11.1
pandas_datareader: None
bs4 : 4.6.0
bottleneck : 1.3.0
fastparquet : None
gcsfs : None
lxml.etree : 4.2.1
matplotlib : 2.2.2
numexpr : 2.6.4
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : 0.13.0
pytables : None
pytest : 4.3.0
pyxlsb : None
s3fs : None
scipy : 1.4.1
sqlalchemy : 1.3.16
tables : 3.4.2
tabulate : 0.8.5
xarray : 0.10.9
xlrd : 1.1.0
xlwt : None
xlsxwriter : None
numba : 0.42.0
]
The text was updated successfully, but these errors were encountered: