i have a csv file that is generated by exporting a Tableau table to csv, but I can not manage to open it in Python.
I have tried to use pd.read_csv but that fails.
import pandas as pd
#path to file
path = "tableau_crosstab.csv"
data = pd.read_csv(path, encoding="ISO-8859-1")
This works for reading in the file, but the result is just a number of rows with one character per row, and some weird characters in the head of the frame.
ÿþd
o
m
a
i
and so on. When I try to import the file in Excel I have to select tab as separator, but when I trie that here it fails
import pandas as pd
#path to file
path = "tableau_crosstab.csv"
data = pd.read_csv(path, encoding="ISO-8859-1", sep='\t')
CParserError: Error tokenizing data. C error: Expected 1 fields in line 7, saw 2
I did try to open the file with codecs, and then it says the encoding is 'cp1252', but using that as the encoding fails too.
I also tried to read it in using utf-8 and that also fails. I am running out of ideas for how to solve this.
Here is a link to where a copy if the file is if someone could take a look http://www.mediafire.com/file/6dtxo2deczwy3u2/tableau_crosstab.csv