My script
import geopandas as gp
test = gp.GeoDataFrame(columns=['geometry', 'costs'])
the error:
File "/usr/local/lib/python3.7/dist-packages/geopandas/geodataframe.py", line 89, in__init__ super(GeoDataFrame, self).__init__(*args, **kwargs)
file "/usr/lib/python3/dist-packages/pandas/core/frame.py", line 348, in __init__
mgr = self._init_dict(data, index, columns, dtype=dtype)
File "/usr/lib/python3/dist-packages/pandas/core/frame.py", line 451, in _init_dict nan_dtype)
File "/usr/lib/python3/dist-packages/pandas/core/dtypes/cast.py", line 1196, in construct_1d_arraylike_from_scalar
dtype = dtype.dtype
AttributeError: type object 'object' has no attribute 'dtype'
What could be the reason for that? It always worked for me like that. Now I had a software update and it suddenly does not work anymore.
geopandas.show_versions()
->[...] python: 3.9.1 [...] GDAL: 2.4.4 [...] geopandas: 0.8.2 [...] pandas: 1.2.2
– Stefan Feb 18 at 13:23