From 321c8d2c654f8a0c1688bd989867aa4f034f3569 Mon Sep 17 00:00:00 2001 From: Tuhin Sharma Date: Mon, 10 Feb 2025 13:57:17 +0530 Subject: [PATCH 1/2] DOC: fix ES01 for is a dtype representation for categorical data, which allows users to define a fixed set of values and optionally impose an ordering. This is particularly useful for handling categorical variables efficiently, as it can significantly reduce memory usage compared to using object dtypes. --- pandas/core/dtypes/dtypes.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pandas/core/dtypes/dtypes.py b/pandas/core/dtypes/dtypes.py index d8dd6441913b5..52d3342e5eb3e 100644 --- a/pandas/core/dtypes/dtypes.py +++ b/pandas/core/dtypes/dtypes.py @@ -161,6 +161,11 @@ class CategoricalDtype(PandasExtensionDtype, ExtensionDtype): """ Type for categorical data with the categories and orderedness. + It is a dtype representation for categorical data, which + allows users to define a fixed set of values and optionally impose an ordering. + This is particularly useful for handling categorical variables efficiently, + as it can significantly reduce memory usage compared to using object dtypes. + Parameters ---------- categories : sequence, optional From ff5c0795016cd0d9f0966b039f63ee8e1dd07025 Mon Sep 17 00:00:00 2001 From: Tuhin Sharma Date: Mon, 10 Feb 2025 13:57:54 +0530 Subject: [PATCH 2/2] DOC: fix ES01 for pandas.CategoricalDtype --- pandas/core/dtypes/dtypes.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pandas/core/dtypes/dtypes.py b/pandas/core/dtypes/dtypes.py index 52d3342e5eb3e..6be6787862654 100644 --- a/pandas/core/dtypes/dtypes.py +++ b/pandas/core/dtypes/dtypes.py @@ -161,10 +161,10 @@ class CategoricalDtype(PandasExtensionDtype, ExtensionDtype): """ Type for categorical data with the categories and orderedness. - It is a dtype representation for categorical data, which - allows users to define a fixed set of values and optionally impose an ordering. - This is particularly useful for handling categorical variables efficiently, - as it can significantly reduce memory usage compared to using object dtypes. + It is a dtype representation for categorical data, which allows users to define + a fixed set of values and optionally impose an ordering. This is particularly + useful for handling categorical variables efficiently, as it can significantly + reduce memory usage compared to using object dtypes. Parameters ----------