Skip to content

Conversation

@lukasmasuch
Copy link
Collaborator

@lukasmasuch lukasmasuch commented Apr 23, 2023

📚 Context

A user expects that if you input a list or some other kind of non-dataframe data structure in data_editor missing values are represented as None and not some other types of missing values used inside Pandas (e.g. np.nan, pd.NaT, pd.NA...). This unifies all missing values to None in the output for some of the supported data formats: LIST_OF_RECORDS, LIST_OF_ROWS, COLUMN_INDEX_MAPPING, COLUMN_VALUE_MAPPING, LIST_OF_VALUES, TUPLE_OF_VALUES, SET_OF_VALUES, KEY_VALUE_DICT.

  • What kind of change does this PR introduce?

    • Bugfix
    • Feature
    • Refactoring
    • Other, please describe:

🧪 Testing Done

  • Screenshots included
  • Added/Updated unit tests
  • Added/Updated e2e tests

Contribution License Agreement

By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.

@lukasmasuch lukasmasuch changed the title Unify missing values for st.data_editor return Unify missing values to None in the returned datastructure by st.data_editor. Apr 23, 2023
@lukasmasuch lukasmasuch added the security-assessment-completed Security assessment has been completed for PR label Apr 23, 2023
@lukasmasuch lukasmasuch marked this pull request as ready for review April 23, 2023 16:04
Copy link
Contributor

@willhuang1997 willhuang1997 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@lukasmasuch lukasmasuch merged commit d3a9423 into develop Apr 24, 2023
tconkling added a commit to tconkling/streamlit that referenced this pull request Apr 25, 2023
* develop:
  Decouple MetricsManager from AppNode (streamlit#6557)
  Fix top padding on sidebar when embed is true (streamlit#6565)
  Add support for cell and column header tooltips in the dataframe component (streamlit#6561)
  Update dataframe column properties on frontend (streamlit#6554)
  Show warning for unsafe integer cells in `st.dataframe` (streamlit#6549)
  Add icon for editable columns in `st.data_editor` (streamlit#6550)
  Unify missing values to None in the returned datastructure by `st.data_editor`.  (streamlit#6544)
  Clean up and reorganize element tree module (streamlit#6522)
  ESLint: use `--cache` flag (30x speedup!) (streamlit#6555)
  Replace `st.connection` with `st.experimental_connection` in docstring examples (streamlit#6553)
  Improve editing on touch devices for `st.data_editor` (streamlit#6548)
  Move pandas styler logic to dedicated module (streamlit#6543)
@sfc-gh-kmcgrady sfc-gh-kmcgrady deleted the feature/unify-missing-values branch October 5, 2023 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

security-assessment-completed Security assessment has been completed for PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants