code: def convert_geoDataFrame_to_patches(gdf, geometry_column):
      """Creates from a geoDataFrame with Polygons and Multipolygons a Pandas DataFrame
      with x any y columns specifying the geometry of the Polygons."""
  
      df_new = []
  
      def add_x_and_y_columns(row, geometry):
          row = row.copy()
          x, y = geometry.exterior.xy
  
          # Convert to int for web mercador projection to save space:
          row["__x__"] = [[[int(_) for _ in x]]]
          row["__y__"] = [[[int(_) for _ in y]]]
  
          for interior in geometry.interiors:
              x, y, *z = zip(*interior.coords)
              row["__x__"][0].append([int(_) for _ in x])
              row["__y__"][0].append([int(_) for _ in y])
  
          return row
  
      for i, row in gdf.iterrows():
          geometry = row[geometry_column]
          if geometry.geom_type == "Polygon":
              df_new.append(add_x_and_y_columns(row, geometry))
  
          if geometry.geom_type == "MultiPolygon":
              for polygon in list(geometry.geoms):
                  df_new.append(add_x_and_y_columns(row, polygon))
  
      df_new = pd.DataFrame(df_new)
  
      df_new = df_new.drop(columns=[geometry_column])
      return df_new
  
file_path: Pandas-Bokeh/pandas_bokeh/geoplot.py
imports: import numbers
  from collections.abc import Hashable, Iterable
  import numpy
  import pandas
  from bokeh.colors import RGB
  from bokeh.models import NumeralTickFormatter, TickFormatter
  from bokeh.tile_providers import get_provider
  from .base import embedded_html
label_desc: Use image node_id 4 for calling a global function with example usage: convert_geoDataFrame_to_patches(gdf, geometry_column) and returns: df_new, row