Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove deprecated DataSetProtocol.cache.to_pandas method #5626

Merged
merged 2 commits into from
Jan 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/changes/newsfragments/5626.breaking
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The deprecated method `DataSetProtocol.cache.to_pandas` has been removed. Use the to_pandas_dataframe or to_pandas_dataframe_dict methods as an alternative.
21 changes: 0 additions & 21 deletions src/qcodes/dataset/data_set_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from qcodes.dataset.descriptions.rundescriber import RunDescriber
from qcodes.dataset.sqlite.connection import ConnectionPlus
from qcodes.dataset.sqlite.queries import completed, load_new_data_for_rundescriber
from qcodes.utils import deprecate

from .exporters.export_to_pandas import (
load_to_concatenated_dataframe,
Expand Down Expand Up @@ -156,26 +155,6 @@ def to_pandas_dataframe(self) -> pd.DataFrame:
data = self.data()
return load_to_concatenated_dataframe(data)

@deprecate(alternative="to_pandas_dataframe or to_pandas_dataframe_dict")
def to_pandas(self) -> dict[str, pd.DataFrame]:
"""
Returns the values stored in the :class:`.dataset.data_set.DataSet` as a
concatenated :py:class:`pandas.DataFrame` s

The DataFrame contains a column for the data and is indexed by a
:py:class:`pandas.MultiIndex` formed from all the setpoints
of the parameter.

Note that if the dataset contains data for multiple parameters that do
not share the same setpoints it is recommended to use
:py:class:`.to_pandas_dataframe_dict`

Returns:
:py:class:`pandas.DataFrame` s with the requested parameter as
a column and a indexed by a :py:class:`pandas.MultiIndex` formed
by the dependencies.
"""
return self.to_pandas_dataframe_dict()

def to_xarray_dataarray_dict(
self, *, use_multi_index: Literal["auto", "always", "never"] = "auto"
Expand Down