-
-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Closed
Labels
Dtype ConversionsUnexpected or buggy dtype conversionsUnexpected or buggy dtype conversionsEnhancementIO DataIO issues that don't fit into a more specific labelIO issues that don't fit into a more specific label
Milestone
Description
OPs code from http://stackoverflow.com/questions/16988526/pandas-reading-csv-as-string-type
Add: auto conversion from a passed str
or np.string_
to np.object
might be ok
df
A B
1A 0.209059 0.275554
1B 0.742666 0.721165
df.to_csv(savefile)
df_read = pd.read_csv(savefile, dtype=str, index_col=0)
A B
B ( <
Actually I get something different on dev:
In [101]: pd.read_csv('a', index_col=0, dtype=str)
Out[101]:
A B
Metadata
Metadata
Assignees
Labels
Dtype ConversionsUnexpected or buggy dtype conversionsUnexpected or buggy dtype conversionsEnhancementIO DataIO issues that don't fit into a more specific labelIO issues that don't fit into a more specific label