memoryfm.ScrobbleLog.from_parquet#
- classmethod ScrobbleLog.from_parquet(meta_file, df_file, start=None, end=None, *, artists=None, albums=None, tracks=None)#
Create a ScrobbleLog from a canonical parquet export.
- Parameters:
- meta_filePathLike or TextIOBase object
JSON file containing ScrobbleLog met as JSON string. The following types are accepted
A pathlib path, or
A string corresponding to a path, such as
/home/username/Documents/filename, orA TextIOBase object having a
read()method.
- df_filePathLike or TextIOBase object
Parquet file containing the ScrobbleLog DataFrame. The following types are accepted
A pathlib path, or
A string corresponding to a path, such as
/home/username/Documents/filename, orA TextIOBase object having a
read()method.
- startstr, pd.Timestamp, datetime.datetime, default None
The datetime to start reading the scrobbles.
- endstr, pd.Timestamp, datetime.datetime, default None
The datetime to stop reading the scrobbles.
- artistsList[str], default None
A list of strings containing artist names. It’s a whitelist, i.e. only scrobbles with artist names from among the list are included.
- albumsList[str], default None
A list of strings containing album names. It’s a whitelist, i.e. only scrobbles with album names from among the list are included.
- tracksList[str], default None
A list of strings containing track names. It’s a whitelist, i.e. only scrobbles with track names from among the list are included.
- Returns:
- ScrobbleLog
See also
to_parquet()Write ScrobbleLog to canonical parquet.