Skip to content

Allow duplicate index values for to_csv #1373

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
lodagro opened this issue Jun 1, 2012 · 1 comment
Closed

Allow duplicate index values for to_csv #1373

lodagro opened this issue Jun 1, 2012 · 1 comment
Labels
Bug IO Data IO issues that don't fit into a more specific label
Milestone

Comments

@lodagro
Copy link
Contributor

lodagro commented Jun 1, 2012

In [22]: df
Out[22]:
              0         1         2
A 1 2  0.659855  0.340490  0.351028
    2  0.695581  0.264714  0.389929
B   2  0.105016  0.070774  0.114629

In [23]: df.to_csv('foo.csv')
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)

TypeError: only integer arrays with one element can be converted to an index

In [24]: df1
Out[24]:
          0         1         2
a  0.313015  0.631747  0.091818
a  0.505238  0.260553  0.793378
b  0.441791  0.029851  0.139490

In [25]: df1.to_csv('foo.csv')
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)

ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
@lodagro
Copy link
Contributor Author

lodagro commented Jun 7, 2012

Works fine now, thanks.

@lodagro lodagro closed this as completed Jun 7, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug IO Data IO issues that don't fit into a more specific label
Projects
None yet
Development

No branches or pull requests

1 participant