Patching Dec 9, 2021 6-7a CST- All GitLab services may be unavailable for 5-10 minutes

Commit e09a2747 authored by Matthew Krafczyk's avatar Matthew Krafczyk
Browse files

Make clearer error message for missing data

parent 6fde2d22
from .sequence import sequence_df, contiguous_group_indices
__version__ = "0.2.0"
__version__ = "0.2.0.1"
__all__ = [ "sequence_df", "contiguous_group_indices" ]
......@@ -253,6 +253,8 @@ def sequence_df(df, lags, group_specs):
slice_df = temp_gbydf.shift(-lag)
if slice_df is not None:
if len(slice_df) == 0:
raise ValueError(f"No data at lag {lag}")
slice_df.columns = pd.MultiIndex.from_product([slice_df.columns,[lag]])
dfs.append(slice_df)
......
......@@ -2,7 +2,7 @@ from setuptools import setup
setup(
name = "pandas_sequence",
version = "0.2.0",
version = "0.2.0.1",
author = "Matthew Krafczyk",
author_email = "krafczyk.matthew@gmail.com",
description = ("A sequence building utility library"),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment