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
Join us at Smartsheet ENGAGE 2024 🎉
October 8 - 10, Seattle, WA | Register now
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 62.5K Get Help
- 367 Global Discussions
- 202 Industry Talk
- 432 Announcements
- 4.4K Ideas & Feature Requests
- 137 Brandfolder
- 129 Just for fun
- 128 Community Job Board
- 447 Show & Tell
- 29 Member Spotlight
- 1 SmartStories
- 285 Events
- 36 Webinars
- 7.3K Forum Archives