Skip to content

Conversation

@cinabars
Copy link
Contributor

Sorting a MultiIndex dataframe improves performance. In some cases, indexing a MultiIndex dataframe without sorting can even throw an UnsortedIndexError, so this change prevents that from occuring. (source: https://pandas.pydata.org/pandas-docs/stable/user_guide/advanced.html#sorting-a-multiindex)

@cheind
Copy link
Owner

cheind commented Sep 12, 2020

Hey thanks for the PR!

Couple of comments:

  • Calling sort_index in new_event_dataframe is not doing anything as the dataframe is empty.
  • Did you see any performance improvements?
  • Did the error you mentioned actually occur?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants