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 help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.2K Get Help
- 419 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 141 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 299 Events
- 38 Webinars
- 7.3K Forum Archives