code: def dfTObedtool(df):
      
  
      df=df.astype(str)
      df=df.drop_duplicates()
      df=df.values.tolist()
      df=["\t".join(s) for s in df ]
      df="\n".join(df)
      df=BedTool(df, from_string=True)
      return df
docs: Transforms a pandas dataframe into a bedtool
  
      :param df: Pandas dataframe
  
      :returns: a bedtool