-
Notifications
You must be signed in to change notification settings - Fork 84
Open
Labels
bugThe problem described is something that must be fixedThe problem described is something that must be fixed
Description
Dear uproot developers, uproot seems to have suddenly lost its ability to save pandas data frames as root files. Previous versions of uproot5 can do this.
>>> import uproot
>>> uproot.__version__uproot 5.6.8
Example
import uproot
import pandas
df = pandas.DataFrame({"a" : [1,2,3], "b" : [4,5,6]})
with uproot.recreate("file.root") as f:
f["mytree"] = dfError:
Traceback (most recent call last):
File "/projectpath/debug/test.py", line 9, in <module>
f["mytree"] = df
~^^^^^^^^^^
File "/envpath/envs/py/lib/python3.13/site-packages/uproot/writing/writable.py", line 986, in __setitem__
self.update({where: what})
~~~~~~~~~~~^^^^^^^^^^^^^^^
File "/envpath/envs/py/lib/python3.13/site-packages/uproot/writing/writable.py", line 1598, in update
uproot.writing.identify.add_to_directory(v, name, directory, streamers)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/envpath/envs/py/lib/python3.13/site-packages/uproot/writing/identify.py", line 57, in add_to_directory
obj = uproot.writing.writable._regularize_input_type(obj)
File "/envpath/envs/py/lib/python3.13/site-packages/uproot/writing/writable.py", line 2227, in _regularize_input_type
obj = uproot.writing._cascadetree.dataframe_to_dict(obj)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'uproot.writing' has no attribute '_cascadetree'
Metadata
Metadata
Assignees
Labels
bugThe problem described is something that must be fixedThe problem described is something that must be fixed