docstr: Args:
      df (SmartDataframe): SmartDataframe to sample from.
code: def __init__(self, df: DataFrameType):
      """
      Args:
          df (SmartDataframe): SmartDataframe to sample from.
      """
      if df_type(df) == "polars":
          df = df.to_pandas()
      self.df = df
  
file_path: pandas-ai/pandasai/helpers/data_sampler.py
imports: import random
  import pandas
  import numpy
  from .df_info import df_type, DataFrameType
  from .anonymizer import Anonymizer
label_desc: Use image node_id 1 to create a new DataSampler object  with example: obj = DataSampler(df)