diff --git a/great_expectations/dataset/pandas_dataset.py b/great_expectations/dataset/pandas_dataset.py
index 5b3b5447e..c53c23a11 100644
--- a/great_expectations/dataset/pandas_dataset.py
+++ b/great_expectations/dataset/pandas_dataset.py
@@ -250,7 +250,7 @@ class PandasDataset(MetaPandasDataset, pd.DataFrame):
 
     @property
     def _constructor(self):
-        return PandasDataset
+        return self.__class__
 
 # Do we need to define _constructor_sliced and/or _constructor_expanddim? See http://pandas.pydata.org/pandas-docs/stable/internals.html#subclassing-pandas-data-structures
 

When calling groupby on subclassed PandasDataset, groups revert to PandasDataset
It's possible I'm doing something wrong when subclassing, but: 

I'm subclassing PandasDataset to create custom expectations. When calling the groupby method on these custom datasets, the groups revert to the base PandasDataset type (and lose the custom expectation methods). 

```
import great_expectations as ge
import pandas as pd
from great_expectations.dataset import Dataset, PandasDataset

class SubclassPandasDataset(PandasDataset, pd.DataFrame):
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)

df = pd.DataFrame([{'a': 1}, {'a': 2}, {'a':1}])
sdf = ge._convert_to_dataset_class(df, SubclassPandasDataset)
print(type(sdf))

for ix, g in sdf.groupby('a'):
    print(type(g))
```
output:

<class '__main__.SubclassPandasDataset'>
<class 'great_expectations.dataset.pandas_dataset.PandasDataset'>
<class 'great_expectations.dataset.pandas_dataset.PandasDataset'>
diff --git a/tests/test_pandas_dataset.py b/tests/test_pandas_dataset.py
index 250c1e6e5..1bd3cc4c4 100644
--- a/tests/test_pandas_dataset.py
+++ b/tests/test_pandas_dataset.py
@@ -1032,5 +1032,30 @@ class TestPandasDataset(unittest.TestCase):
         self.assertIsInstance(sub1, ge.dataset.PandasDataset)
         self.assertEqual(sub1.find_expectations(), exp1)
 
+    def test_subclass_pandas_subset_retains_subclass(self):
+        """A subclass of PandasDataset should still be that subclass after a Pandas subsetting operation"""
+        class CustomPandasDataset(ge.dataset.PandasDataset):
+
+            @ge.dataset.MetaPandasDataset.column_map_expectation
+            def expect_column_values_to_be_odd(self, column):
+                return column.map(lambda x: x % 2 )
+
+            @ge.dataset.MetaPandasDataset.column_map_expectation
+            def expectation_that_crashes_on_sixes(self, column):
+                return column.map(lambda x: (x-6)/0 != "duck")
+
+        df = CustomPandasDataset({
+            'all_odd': [1, 3, 5, 5, 5, 7, 9, 9, 9, 11],
+            'mostly_odd': [1, 3, 5, 7, 9, 2, 4, 1, 3, 5],
+            'all_even': [2, 4, 4, 6, 6, 6, 8, 8, 8, 8],
+            'odd_missing': [1, 3, 5, None, None, None, None, 1, 3, None],
+            'mixed_missing': [1, 3, 5, None, None, 2, 4, 1, 3, None],
+            'all_missing': [None, None, None, None, None, None, None, None, None, None]
+        })
+
+        df2 = df.sample(frac=0.5)
+        self.assertTrue(type(df2) == type(df))
+
+
 if __name__ == "__main__":
     unittest.main()

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest pytest-cov
3.6
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
alembic==1.7.7
anyio==3.6.2
apache-airflow==2.2.5
apache-airflow-providers-amazon==3.0.0
apache-airflow-providers-ftp==2.1.0
apache-airflow-providers-http==2.1.0
apache-airflow-providers-imap==2.2.1
apache-airflow-providers-sqlite==2.1.1
apispec==3.3.2
argcomplete==2.1.2
argh==0.27.2
asn1crypto==1.5.1
async-generator==1.10
attrs==20.3.0
Babel==2.11.0
beautifulsoup4==4.12.3
blinker==1.5
boto3==1.23.10
botocore==1.26.10
cached-property==1.5.2
cachelib==0.6.0
cattrs==1.0.0
certifi==2021.5.30
cffi==1.15.1
charset-normalizer==2.0.12
click==7.1.2
clickclick==20.10.2
colorama==0.4.5
colorlog==6.9.0
commonmark==0.9.1
connexion==2.14.2
contextvars==2.4
coverage==6.2
croniter==6.0.0
cryptography==40.0.2
dataclasses==0.8
defusedxml==0.7.1
Deprecated==1.2.18
dill==0.3.4
dnspython==2.2.1
docutils==0.16
email-validator==1.3.1
Flask==1.1.4
Flask-AppBuilder==3.4.5
Flask-Babel==2.0.0
Flask-Caching==1.10.1
Flask-JWT-Extended==3.25.1
Flask-Login==0.4.1
Flask-OpenID==1.3.1
Flask-Session==0.4.0
Flask-SQLAlchemy==2.5.1
Flask-WTF==0.14.3
graphviz==0.19.1
-e git+https://github.com/great-expectations/great_expectations.git@abb6d090c69a7793b98d4c8d3cbd048d614fc657#egg=great_expectations
gunicorn==21.2.0
h11==0.12.0
httpcore==0.14.7
httpx==0.22.0
idna==3.10
immutables==0.19
importlib-metadata==4.8.3
importlib-resources==5.4.0
inflection==0.5.1
iniconfig==1.1.1
iso8601==1.1.0
itsdangerous==1.1.0
Jinja2==2.11.3
jmespath==0.10.0
jsonpath-ng==1.7.0
jsonschema==3.2.0
lazy-object-proxy==1.7.1
lockfile==0.12.2
lxml==5.3.1
Mako==1.1.6
Markdown==3.3.7
MarkupSafe==2.0.1
marshmallow==3.14.1
marshmallow-enum==1.5.1
marshmallow-oneofschema==3.0.1
marshmallow-sqlalchemy==0.26.1
numpy==1.19.5
packaging==21.3
pandas==1.1.5
pendulum==2.1.2
pep562==1.1
pluggy==1.0.0
ply==3.11
prison==0.2.1
psutil==5.9.8
py==1.11.0
pycparser==2.21
Pygments==2.14.0
PyJWT==1.7.1
pyparsing==3.1.4
pyrsistent==0.18.0
pytest==7.0.1
pytest-cov==4.0.0
python-daemon==2.3.2
python-dateutil==2.9.0.post0
python-nvd3==0.15.0
python-slugify==4.0.1
python3-openid==3.2.0
pytz==2025.2
pytzdata==2020.1
PyYAML==6.0.1
redshift-connector==2.0.918
requests==2.27.1
rfc3986==1.5.0
rich==12.6.0
s3transfer==0.5.2
scipy==1.5.4
scramp==1.4.1
setproctitle==1.2.3
six==1.17.0
sniffio==1.2.0
soupsieve==2.3.2.post1
SQLAlchemy==1.3.24
SQLAlchemy-JSONField==1.0.0
sqlalchemy-redshift==0.8.14
SQLAlchemy-Utils==0.41.1
swagger-ui-bundle==0.0.9
tabulate==0.8.10
tenacity==8.2.2
termcolor==1.1.0
text-unidecode==1.3
tomli==1.2.3
typing==3.7.4.3
typing_extensions==4.1.1
unicodecsv==0.14.1
urllib3==1.26.20
watchtower==2.0.1
Werkzeug==1.0.1
wrapt==1.16.0
WTForms==2.3.3
zipp==3.6.0

name: great_expectations
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=21.2.2=py36h06a4308_0
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - alembic==1.7.7
      - anyio==3.6.2
      - apache-airflow==2.2.5
      - apache-airflow-providers-amazon==3.0.0
      - apache-airflow-providers-ftp==2.1.0
      - apache-airflow-providers-http==2.1.0
      - apache-airflow-providers-imap==2.2.1
      - apache-airflow-providers-sqlite==2.1.1
      - apispec==3.3.2
      - argcomplete==2.1.2
      - argh==0.27.2
      - asn1crypto==1.5.1
      - async-generator==1.10
      - attrs==20.3.0
      - babel==2.11.0
      - beautifulsoup4==4.12.3
      - blinker==1.5
      - boto3==1.23.10
      - botocore==1.26.10
      - cached-property==1.5.2
      - cachelib==0.6.0
      - cattrs==1.0.0
      - cffi==1.15.1
      - charset-normalizer==2.0.12
      - click==7.1.2
      - clickclick==20.10.2
      - colorama==0.4.5
      - colorlog==6.9.0
      - commonmark==0.9.1
      - connexion==2.14.2
      - contextvars==2.4
      - coverage==6.2
      - croniter==6.0.0
      - cryptography==40.0.2
      - dataclasses==0.8
      - defusedxml==0.7.1
      - deprecated==1.2.18
      - dill==0.3.4
      - dnspython==2.2.1
      - docutils==0.16
      - email-validator==1.3.1
      - flask==1.1.4
      - flask-appbuilder==3.4.5
      - flask-babel==2.0.0
      - flask-caching==1.10.1
      - flask-jwt-extended==3.25.1
      - flask-login==0.4.1
      - flask-openid==1.3.1
      - flask-session==0.4.0
      - flask-sqlalchemy==2.5.1
      - flask-wtf==0.14.3
      - graphviz==0.19.1
      - gunicorn==21.2.0
      - h11==0.12.0
      - httpcore==0.14.7
      - httpx==0.22.0
      - idna==3.10
      - immutables==0.19
      - importlib-metadata==4.8.3
      - importlib-resources==5.4.0
      - inflection==0.5.1
      - iniconfig==1.1.1
      - iso8601==1.1.0
      - itsdangerous==1.1.0
      - jinja2==2.11.3
      - jmespath==0.10.0
      - jsonpath-ng==1.7.0
      - jsonschema==3.2.0
      - lazy-object-proxy==1.7.1
      - lockfile==0.12.2
      - lxml==5.3.1
      - mako==1.1.6
      - markdown==3.3.7
      - markupsafe==2.0.1
      - marshmallow==3.14.1
      - marshmallow-enum==1.5.1
      - marshmallow-oneofschema==3.0.1
      - marshmallow-sqlalchemy==0.26.1
      - numpy==1.19.5
      - packaging==21.3
      - pandas==1.1.5
      - pendulum==2.1.2
      - pep562==1.1
      - pluggy==1.0.0
      - ply==3.11
      - prison==0.2.1
      - psutil==5.9.8
      - py==1.11.0
      - pycparser==2.21
      - pygments==2.14.0
      - pyjwt==1.7.1
      - pyparsing==3.1.4
      - pyrsistent==0.18.0
      - pytest==7.0.1
      - pytest-cov==4.0.0
      - python-daemon==2.3.2
      - python-dateutil==2.9.0.post0
      - python-nvd3==0.15.0
      - python-slugify==4.0.1
      - python3-openid==3.2.0
      - pytz==2025.2
      - pytzdata==2020.1
      - pyyaml==6.0.1
      - redshift-connector==2.0.918
      - requests==2.27.1
      - rfc3986==1.5.0
      - rich==12.6.0
      - s3transfer==0.5.2
      - scipy==1.5.4
      - scramp==1.4.1
      - setproctitle==1.2.3
      - six==1.17.0
      - sniffio==1.2.0
      - soupsieve==2.3.2.post1
      - sqlalchemy==1.3.24
      - sqlalchemy-jsonfield==1.0.0
      - sqlalchemy-redshift==0.8.14
      - sqlalchemy-utils==0.41.1
      - swagger-ui-bundle==0.0.9
      - tabulate==0.8.10
      - tenacity==8.2.2
      - termcolor==1.1.0
      - text-unidecode==1.3
      - tomli==1.2.3
      - typing==3.7.4.3
      - typing-extensions==4.1.1
      - unicodecsv==0.14.1
      - urllib3==1.26.20
      - watchtower==2.0.1
      - werkzeug==1.0.1
      - wrapt==1.16.0
      - wtforms==2.3.3
      - zipp==3.6.0
prefix: /opt/conda/envs/great_expectations

tests/test_pandas_dataset.py::TestPandasDataset::test_subclass_pandas_subset_retains_subclass
tests/test_pandas_dataset.py::TestPandasDataset::test_expect_column_values_to_be_dateutil_parseable tests/test_pandas_dataset.py::TestPandasDataset::test_expect_column_values_to_be_in_type_list tests/test_pandas_dataset.py::TestPandasDataset::test_expect_column_values_to_be_json_parseable tests/test_pandas_dataset.py::TestPandasDataset::test_expect_column_values_to_be_of_type tests/test_pandas_dataset.py::TestPandasDataset::test_expect_column_values_to_match_strftime_format tests/test_pandas_dataset.py::TestPandasDataset::test_expectation_decorator_summary_mode tests/test_pandas_dataset.py::TestPandasDataset::test_from_pandas tests/test_pandas_dataset.py::TestPandasDataset::test_from_pandas_expectations_config tests/test_pandas_dataset.py::TestPandasDataset::test_ge_pandas_automatic_failure_removal tests/test_pandas_dataset.py::TestPandasDataset::test_ge_pandas_concatenating tests/test_pandas_dataset.py::TestPandasDataset::test_ge_pandas_joining tests/test_pandas_dataset.py::TestPandasDataset::test_ge_pandas_merging tests/test_pandas_dataset.py::TestPandasDataset::test_ge_pandas_sampling tests/test_pandas_dataset.py::TestPandasDataset::test_ge_pandas_subsetting tests/test_pandas_dataset.py::TestPandasDataset::test_positional_arguments tests/test_pandas_dataset.py::TestPandasDataset::test_result_format_argument_in_decorators
great_expectations/dataset/pandas_dataset.py
great_expectations/dataset/pandas_dataset.py