Read exported schedule in Python?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
Has anyone tried to import a revit schedule in tab-delimited format into Python, using Pandas? Thought I'd give it a shot, but I'm stuck. I have a regular old schedule coming from a material takeoff, I export to text. I export column names only, with tab as a delimiter and regular quotes as text delimiter.
In Revit I have something like this:
Export and I get this in the text file, which is what I expect:
In Python, I grab the file using Pandas:
df = pd.read_csv(file_name,sep='\t',quotechar='"',header=0)
And then I print to see what I got:
Import 0: material-original.txt
Index(['��"', 'Unnamed: 1', 'Unnamed: 2'], dtype='object')
Empty DataFrame
Columns: []
Index: []
I don't get why the column names aren't being imported, and of course, no data is imported either. Despite the separator being set to tab. Tried telling Revit to export with a comma delimiter, and this time the importer crashed without even trying.