You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @rom1504, should we reset the index when reading multiple metadata parquet files?
class ParquetMetadataProvider:
"""The parquet metadata provider provides metadata from contiguous ids using parquet"""
def __init__(self, parquet_folder):
data_dir = Path(parquet_folder)
self.metadata_df = pd.concat(
pd.read_parquet(parquet_file) for parquet_file in sorted(data_dir.glob("*.parquet"))
)
def get(self, ids, cols=None):
if cols is None:
cols = self.metadata_df.columns.tolist()
else:
cols = list(set(self.metadata_df.columns.tolist()) & set(cols))
return [self.metadata_df[i : (i + 1)][cols].to_dict(orient="records")[0] for i in ids]
The text was updated successfully, but these errors were encountered:
Hi @rom1504, should we reset the index when reading multiple metadata parquet files?
The text was updated successfully, but these errors were encountered: