-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: TypeError: unsupported operand type(s) for +: 'Timestamp' and 'bytes' #48415
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
Unfortunately, I cannot reproduce this on 1.4.4 or main
|
That's the weird behavior I described. The error only occurs in my framework, but I can not reproduce what causes this error without posting my whole code... |
Got it. Yeah unfortunately it would be fairly hard to diagnose for anyone without the full context of the environment. Some suggestions:
Closing otherwise since this isn't fully reproducible. |
For anyone who's interested, I solved my problem by doing the following:
to
This function get's called on the dataset before later on, I tried to do the slicing in some kind of the way I posted above. |
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
The weirdest part is, that I can not reproduce this error, doesn't matter what I tried. I even exported the .csv of the dataframe I work with but it doesn't reproduce the error. The code above comes the closest that I want to do. I understand, that it's bad to not post a reproducible example, but maybe anyone knows, what changes between the version that causes the error. If not, this bug report can be deleted and I continue working with version 1.0.5.
This line worked perfectly for pandas version 1.0.5. After upgrading it throws this error when doing the slicing
df_copy = df_copy[0:]
. I also tried to use.iloc
which also didn't solve the problem. In my code, instead of the 0, there is this lineself.user_input_params["refit_window"]
, just to clarify for you why I don't just use the completeX_train_val_manip
dataframe. The user inputself.user_input_params["refit_window"]
should allow the user to cut of the first n rows of the dataframe (because they may be outdated).Expected Behavior
The expected behavior is, that I select the n rows from row n of X_train_val_manip to the end without getting an error.
Installed Versions
INSTALLED VERSIONS
commit : ca60aab
python : 3.8.10.final.0
python-bits : 64
OS : Linux
OS-release : 5.15.0-46-generic
Version : #49~20.04.1-Ubuntu SMP Thu Aug 4 19:15:44 UTC 2022
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : de_DE.UTF-8
LOCALE : de_DE.UTF-8
pandas : 1.4.4
numpy : 1.23.1
pytz : 2022.1
dateutil : 2.8.2
setuptools : 45.2.0
pip : 20.0.2
Cython : 0.29.17
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 3.1.2
IPython : 8.4.0
pandas_datareader: None
bs4 : 4.11.1
bottleneck : None
brotli : None
fastparquet : None
fsspec : 2022.5.0
gcsfs : None
markupsafe : 2.1.1
matplotlib : 3.5.2
numba : None
numexpr : 2.8.3
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pyreadstat : None
pyxlsb : None
s3fs : None
scipy : 1.5.2
snappy : None
sqlalchemy : 1.4.35
tables : 3.7.0
tabulate : 0.8.9
xarray : None
xlrd : None
xlwt : None
zstandard : None
The text was updated successfully, but these errors were encountered: