Int64Index does not support modulo operator under pandas 0.15 #10786
Labels
Duplicate Report
Duplicate issue or pull request
Indexing
Related to indexing on series/frames, not to indexes themselves
In pandas 0.15, a DataFrame's index no longer supports the modulo operator. I believe the following code used to work under pandas 0.14, but under pandas 0.15, a TypeError indicating "unsupported operand types" is raised:
Line 6 shows that a workaround exists, using the to_series() function.
This issue is very similar to Issue #8608, which dealt with other arithemtic operations on an index. Pandas commit 2fcbc7f fixed that issue by adding addition, subtraction, multiplication, division, and unary operators, but not the modulo operator.
The text was updated successfully, but these errors were encountered: