diff_diff.load_dataset#

diff_diff.load_dataset(name, force_download=False)[source]

Load a dataset by name.

Parameters:
  • name (str) – Name of the dataset. Use list_datasets() to see available datasets.

  • force_download (bool, default=False) – If True, re-download the dataset even if cached.

Returns:

The requested dataset.

Return type:

pd.DataFrame

Raises:

ValueError – If the dataset name is not recognized.

Examples

>>> from diff_diff.datasets import load_dataset, list_datasets
>>> print(list_datasets())
>>> df = load_dataset("card_krueger")