---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-9-cdc1553cf003> in <module>
----> 1 print(df1.index.str)
2 print(df1.columns)
3 print(df1.values)
4 print(type(df1.values))
c:\users\samuel\appdata\local\programs\python\python36\lib\site-packages\pandas\core\accessor.py in __get__(self, obj, cls)
131 # we're accessing the attribute of the class, i.e., Dataset.geo
132 return self._accessor
--> 133 accessor_obj = self._accessor(obj)
134 # Replace the property with the accessor object. Inspired by:
135 # http://www.pydanny.com/cached-property.html
c:\users\samuel\appdata\local\programs\python\python36\lib\site-packages\pandas\core\strings.py in __init__(self, data)
1893
1894 def __init__(self, data):
-> 1895 self._validate(data)
1896 self._is_categorical = is_categorical_dtype(data)
1897
c:\users\samuel\appdata\local\programs\python\python36\lib\site-packages\pandas\core\strings.py in _validate(data)
1931 "(i.e. inferred_type is 'string', 'unicode' or "
1932 "'mixed')")
-> 1933 raise AttributeError(message)
1934 if data.nlevels > 1:
1935 message = ("Can only use .str accessor with Index, not "
AttributeError: Can only use .str accessor with string values (i.e. inferred_type is 'string', 'unicode' or 'mixed')