Skip to content

BUG: ItemCollection.to_dataframe() excludes columns if they don't have any data in SharePoint #80

@widal001

Description

@widal001

Overview

When querying a set of items from a SharePoint list if each of the items returned by a query are missing values for a column that column is excluded from the dataframe returned by ItemCollection.to_dataframe()

Steps to Reproduce

Steps to reproduce the behavior:

  1. Instantiate a list class using SharePoint.get_list()
  2. Use SiteList.get_items() to retrieve a set of items for which one column is blank for every item
  3. Use ItemCollection.to_dataframe() to convert the collection returned to a dataframe
  4. Print the list of columns in the dataframe

Expected Behavior

The resulting dataframe should include all fields passed to SiteList.get_items() even if there are no values set.

Screenshots

If applicable, add screenshots to help explain your problem.

Additional Context

The columns aren't returned becauseO365 excludes columns without a value from the Items.fields attribute. They need to be added either during the init step of ItemCollection or during the to_dataframe() method.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinginfrastructureWork that supports multiple ETL pipelines

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions