Skip to content

Commit

Permalink
Merge pull request #5626 from jenshnielsen/remove_to_pandas
Browse files Browse the repository at this point in the history
remove deprecated DataSetProtocol.cache.to_pandas method
  • Loading branch information
jenshnielsen authored Jan 8, 2024
2 parents 23175d5 + a6eba7f commit 16bf69a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 21 deletions.
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

0 comments on commit 16bf69a

Please sign in to comment.