Closed felixbur closed 6 months ago
If only one column is present in the data, it returns a series. You can convert to a dataframe with:
y = audformat.utils.read_csv("train.csv")
df = y.to_frame()
Or if it should be a dataframe independent of the number of columns:
obj = audformat.utils.read_csv("train.csv")
if isinstance(obj, pd.Series):
df = obj.to_frame()
else:
df = obj
The current behavior is not written in the text of the corresponding docstring, but indicated by the return types:
Hi, I want to read in the attached file train.csv
with
but get back a Series, no error:
it works as expected with pandas.read_csv()