UnsupportedIndexError()
Source¶
Bases: NumdaplotError
Raised by Table.from_pandas when the index of the pandas DataFrame is not the plain row numbers 0, 1, 2...
Added in version 0.1.0
Examples:
import numdaplot as ndp
import pandas
frame = pandas.DataFrame({"price": [1, 2]}, index=["Paris", "Lyon"])
try:
ndp.Table.from_pandas(frame)
except ndp.UnsupportedIndexError as error:
print(error)
# A Table has no index, call reset_index() on the pandas DataFrame first to keep its index as a column.