string truncation when using Series.astype(str) · Issue #4405 · pandas-dev/pandas (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Description
When converting a pandas Series object to type string using astype(str)
, long strings are truncated to 64 characters silently.
Pandas version: 0.12
Numpy version: 1.7.1
In [1]: s = '0123456789' * 10
In [2]: tmp = np.array([s]).astype(str) tmp Out[2]: array([ '0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789'], dtype='|S100')
In [3]: tmp = pd.Series([s]).astype(str) tmp[0] Out[3]: '0123456789012345678901234567890123456789012345678901234567890123'
In [4]: len(tmp[0]) Out[4]: 64