Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
widal001 opened this issue Dec 15, 2021 · 0 comments
Assignees
Labels
bug Something isn't working infrastructure Work that supports multiple ETL pipelines

Comments

@widal001
Copy link
Contributor

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.

@widal001 widal001 added the bug Something isn't working label Dec 15, 2021
@widal001 widal001 self-assigned this Dec 15, 2021
@widal001 widal001 added the infrastructure Work that supports multiple ETL pipelines label Jan 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working infrastructure Work that supports multiple ETL pipelines
Projects
None yet
Development

No branches or pull requests

1 participant