Please, refer to this question in StackOverflow for more details:
The OP reads a csv using:
data_df = pd.read_csv("example.csv", sep="\t", index_col=0, names=["test"])
And when doing integration using the "Index" object at data_df.index it does not work, but works with data_df.index.values,,,,
Is it a bug?
There is some indexing going on under the in trapz that does not play nice with an object dtyped array (which is how pandas keeps these types of indices). This is not a bug, more of scipy accepting values which in reality should be coerced to floats; also this will be quite slow using the direct index lookup; float indices are not a good idea in general. see http://pandas.pydata.org/pandas-docs/dev/cookbook.html#computation for a nicer solution
Thank you for your answer!
When we take: index.values it also returns an array of objects... but the objects are floats in this case... that may be the case why it works!
Should I close this issue?