0

From the geopandas example, using world.clip(polygon), I got error as below, same error as I tried on my own cliping code. It said it's type mismatch, so to use astype(str()), but that didn't fix my problem. https://geopandas.org/en/stable/gallery/plot_clip.html

----> 1 world.clip(polygon)

File c:\Users\*\Anaconda3\envs\*\lib\site-packages\pandas\util\_decorators.py:311, in deprecate_nonkeyword_arguments.<locals>.decorate.<locals>.wrapper(*args, **kwargs)
    305 if len(args) > num_allow_args:
    306     warnings.warn(
    307         msg.format(arguments=arguments),
    308         FutureWarning,
    309         stacklevel=stacklevel,
    310     )
--> 311 return func(*args, **kwargs)

File c:\Users\*\Anaconda3\envs\*\lib\site-packages\pandas\core\frame.py:10926, in DataFrame.clip(self, lower, upper, axis, inplace, *args, **kwargs)
  10914 @deprecate_nonkeyword_arguments(
  10915     version=None, allowed_args=["self", "lower", "upper"]
  10916 )
   (...)
  10924     **kwargs,
  10925 ) -> DataFrame | None:
> 10926     return super().clip(lower, upper, axis, inplace, *args, **kwargs)

File c:\Users\*\Anaconda3\envs\*\lib\site-packages\pandas\core\generic.py:7576, in NDFrame.clip(self, lower, upper, axis, inplace, *args, **kwargs)
   7574 result = self
...
     67 if _TEST_MODE:
     68     _store_test_result(False)
---> 69 return op(a, b)

TypeError: '>=' not supported between instances of 'float' and 'Polygon'
Barry
  • 13
  • 1
  • please include your code and the full traceback, starting from `Traceback (most recent call last):` when asking about errors. See the guide to [ask] and how to create a [mre]. thanks! – Michael Delgado Nov 11 '22 at 20:43

0 Answers0