Unable to extract sheetId from row object in a Report

compoa
ββ
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
Tags:
Answers
-
Hi @compoa
I'm not familiar with Pandas DataFrame or the language it needs to parse data. I checked in on Stack Overflow and found some other threads that may help you:
- Python - How to create a pandas Dataframe directly from Smartsheets?
- Pandas DataFrame to Smartsheet sheet
I hope that helps!
Genevieve
Need more information? π | Help and Learning Center
γγγ«γ‘γ― (Konnichiwa), Hallo, Hola, Bonjour, OlΓ‘, Ciao!π | Global Discussions
Categories
NEW Smartsheet API Documentation - bookmark the updated link! https://developers.smartsheet.com