Dear all,
I am investigating an issue that has appeared when updating pandas from 0.15.2 to 0.16.1 when setting multiple columns as the index when these columns are non-trivial python objects. You can reproduce the issue with:
from pandas import DataFrame
a = DataFrame(range(5), columns=["val"])
list_of_frozensets = [frozenset(l) for l in list("abcde")]
a["letter"] = list_of_frozensets
a["letter2"] = list_of_frozensets
print a.set_index(["letter", "letter2"]) # <<< This causes the error
Is this code not reasonable or is there a different recommended way to do that?
This raises a TypeError: 'values' is not ordered, please explicitly specify the categories order by passing in a categories argument.
That comes from the ordered=True in https://github.com/pydata/pandas/blob/master/pandas/core/index.py#L4805 and setting that to False doesn't seem cause any issues, though that might make the indexing operations slower.
--
You received this message because you are subscribed to the Google Groups "PyData" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pydata+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.