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
- Customer Resources
- 64.9K Get Help
- 439 Global Discussions
- 138 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives