diff --git a/clients/py/v3io_frames/pbutils.py b/clients/py/v3io_frames/pbutils.py index b4e7e636..654cab74 100644 --- a/clients/py/v3io_frames/pbutils.py +++ b/clients/py/v3io_frames/pbutils.py @@ -183,7 +183,7 @@ def df2msg(df, labels=None, index_cols=None): indices = None if index_cols is not None: # if there is already an index set, we want to preserve it. - if not (type(df.index) == pd.RangeIndex and df.index.name is None): + if not (isinstance(df.index, pd.RangeIndex) and df.index.name is None): df.reset_index(inplace=True) indices = [series2col(df[name], name) for name in index_cols] cols = [col for col in df.columns if col not in index_cols]