You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, when parsing my v5 file, an ValueError is raised by the function DASware5Parser.parse().
The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all()
ValueError Traceback (most recent call last)
/Users/01_Basic_Use.ipynb Cell 4 in <cell line: 6>()
3 import ipywidgets
5 import detl
----> 6 ddata = detl.parse('v5_Control_1_.csv')
8 # display what the ddata object looks like
9 ddata
File ~/opt/anaconda3/lib/python3.9/site-packages/detl/init.py:61, in parse(filepath, inoculation_times)
46 """Parses a raw DASware CSV file into a DWData object.
47
48 Args:
(...)
58 NotImlementedError: when the file contents do not match with a known DASware CSV style
59 """
60 parser = get_parser(filepath)
---> 61 data = parser.parse(filepath)
63 if inoculation_times:
64 for r, dt_inoculate in inoculation_times.items():
File ~/opt/anaconda3/lib/python3.9/site-packages/detl/parsing/dw5.py:137, in DASware5Parser.parse(self, filepath)
134 dd = common.transform_to_dwdata(scoped_blocks, BLOCKPARSERS, version=core.DASwareVersion.V5)
136 for _, reactor in dd.items():
--> 137 reactor._dataframe = common.transform_trackdata(reactor.trackdata, columnmapping, core.DASwareVersion.V5)
...
1528 f"The truth value of a {type(self).name} is ambiguous. "
1529 "Use a.empty, a.bool(), a.item(), a.any() or a.all()."
1530 )
ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
As far as I could see, the error is produced in common.py in transform_trackdata()
for key, reg in columnmapping.items():
new_data = trackdata.filter(regex=reg, axis="columns").squeeze()
if (not new_data.empty) & (not new_data.isnull().all()):
transformed_data.loc[:, key] = new_data
transformed_data = transformed_data.fillna(method="ffill")
The text was updated successfully, but these errors were encountered:
Hi @lk96er, sorry for not responding for so long. My notification settings weren't right..
Since this problem does not appear with any of our test datasets, I would suspect that it might be a matter of how the data was exported. Can you provide more information about that? Also, hopefully did you solve the problem in the meantime?
Hi, when parsing my v5 file, an ValueError is raised by the function DASware5Parser.parse().
The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all()
As far as I could see, the error is produced in common.py in transform_trackdata()
The text was updated successfully, but these errors were encountered: