Hello!
I would like to create a pandas dataframe with smartsheet Report data.
# Method to convert report to dataframe
col_names = ['sheet_id','row_id'] + [col.title for col in report.columns]
rows = []
for row in report.rows:
# Append the id first
cells = []
cells.append(row.sheetId) # This is where I get an error!
cells.append(row.id)
for cell in row.cells:
cells.append(cell.value)
rows.append(cells)
ss_report_df = pd.DataFrame(rows, columns=col_names)
ss_report_df.dropna(how='all', axis = 1,inplace=True)
The issue is with row.sheetId. I get the error:
AttributeError: sheetId
How come sheetId is unavailable? I have no issues with pulling row.id
, just row.sheetId...
Thanks,
Tony