bertrandmartel / tableau-scraping

Tableau scraper python library. R and Python scripts to scrape data from Tableau viz
MIT License
126 stars 20 forks source link

Warning: mixed data types #72

Open DeflateAwning opened 1 year ago

DeflateAwning commented 1 year ago

When running a scrape, I get this warning (using Pandas 1.5.3).

venv\lib\site-packages\tableauscraper\TableauWorkbook.py:239: DtypeWarning: Columns (0,2,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26) have mixed types. Specify dtype option on import or set low_memory=False.
  return pd.read_csv(StringIO(r), sep='\t')

The code that generates the error:

df = wb.getCrossTabData(sheetName=ws_name)

It would be awesome if there was a way to specify the low_memory=False flag, either by default or maybe as an argument to the TableauScraper() constructor (e.g., TableauScraper(low_memory=False)).