You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
>>> import pandas as pd
>>> import numpy as np
>>> print pd.Series(np.array([1100, 20], dtype='timedelta64[s]'))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python27_64\lib\site-packages\pandas\core\series.py", line 911, in __str__
return repr(self)
File "C:\Python27_64\lib\site-packages\pandas\core\series.py", line 847, in __repr__
name=True)
File "C:\Python27_64\lib\site-packages\pandas\core\series.py", line 908, in _get_repr
return formatter.to_string()
File "C:\Python27_64\lib\site-packages\pandas\core\format.py", line 126, in to_string
fmt_values = self._get_formatted_values()
File "C:\Python27_64\lib\site-packages\pandas\core\format.py", line 117, in _get_formatted_values
na_rep=self.na_rep)
File "C:\Python27_64\lib\site-packages\pandas\core\format.py", line 691, in format_array
return fmt_obj.get_result()
File "C:\Python27_64\lib\site-packages\pandas\core\format.py", line 814, in get_result
fmt_values = [formatter(x) for x in self.values]
File "C:\Python27_64\lib\site-packages\pandas\core\format.py", line 812, in <lambda>
formatter = lambda x: '% d' % x
TypeError: %d format: a number is required, not numpy.timedelta64
This is because timedelta64 is an int type (see format.format_array) but can't be formatted like that.
The text was updated successfully, but these errors were encountered:
This is because timedelta64 is an int type (see format.format_array) but can't be formatted like that.
The text was updated successfully, but these errors were encountered: