Skip to content

Conversation

ivanovmg
Copy link
Contributor

@ivanovmg ivanovmg commented Jan 20, 2021

Moved handing timestamp data from describe_categorical_1d into describe_timestamp_as_categorical_1d.
Extracted function select_describe_func for selecting the proper function, suitable for a given data type.

Pros:

  • Simplified logic on which function is selected for which data type.
  • Improved way of issuing FutureWarning.
  • Next logical step in enabling the strategy pattern.

Cons:

  • Unnecessary argument percentiles_ignored passed into functions for handling categorical types. This is done to unify the interface across all functions for describing a series. The problem will be handled when enabling strategy pattern as the percentiles will become an instance attribute for the strategy class.
  • Slight duplication in describe_categorical_1d into describe_timestamp_as_categorical_1d, which will be handled as the strategy class for categorical data is created (it will be encapsulated there).

@ivanovmg ivanovmg requested a review from jreback January 20, 2021 08:04
@jreback jreback added Refactor Internal refactoring of code Reshaping Concat, Merge/Join, Stack/Unstack, Explode labels Jan 20, 2021
@jreback jreback added this to the 1.3 milestone Jan 20, 2021
@jreback jreback merged commit ae71dc1 into pandas-dev:master Jan 20, 2021
@ivanovmg ivanovmg deleted the refactor/describe branch January 20, 2021 15:17
nofarm3 pushed a commit to nofarm3/pandas that referenced this pull request Jan 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Refactor Internal refactoring of code Reshaping Concat, Merge/Join, Stack/Unstack, Explode

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants