BUG: AttributeError: 'PandasArray' object has no attribute '_str_len'
I am having the following error.

Python 3.7.4 (default, Aug 9 2019, 18:34:13) [MSC v.1915 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.

import pandas as pd
pd.version

'1.1.5'

d = {'col1': [1, 2], 'col2': [3, 4]}
df = pd.DataFrame(data=d)
df

Traceback (most recent call last):
File "", line 1, in
File "C:\Users\wellington.souza\AppData\Local\Continuum\anaconda3\lib\site-packages\pandas\core\frame.py", line 751, in repr
show_dimensions=show_dimensions,
File "C:\Users\wellington.souza\AppData\Local\Continuum\anaconda3\lib\site-packages\pandas\core\frame.py", line 883, in to_string
return formatter.to_string(buf=buf, encoding=encoding)
File "C:\Users\wellington.souza\AppData\Local\Continuum\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 921, in to_string
return self.get_result(buf=buf, encoding=encoding)
File "C:\Users\wellington.souza\AppData\Local\Continuum\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 520, in get_result
self.write_result(buf=f)
File "C:\Users\wellington.souza\AppData\Local\Continuum\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 844, in write_result
max_len = Series(lines).str.len().max()
File "C:\Users\wellington.souza\AppData\Local\Continuum\anaconda3\lib\site-packages\pandas\core\strings\accessor.py", line 2579, in len
result = self._data.array._str_len()
AttributeError: 'PandasArray' object has no attribute '_str_len'