memoryfm.Scrobble#
- class memoryfm.Scrobble(timestamp, track, artist, album=None)#
Class representing a single scrobble/listen.
- Parameters:
- timestamp: pandas Timestamp
Timestamp at which the track was scrobbled.
- track: str
Name/title of the scrobbled track.
- artist: str
Artist name for the scrobbled track.
- album: str, default None
(Optional) Album name for the scrobbled track.
See also
Scrobble.from_dictConstructor from a dictionary with keys corresponding to each parameter (album is optional).
- __init__(timestamp, track, artist, album=None)#
Methods
__init__(timestamp, track, artist[, album])from_dict(data)Construct a Scrobble from a dictionary.
Returns a canonical pandas DataFrame representation of a Scrobble.
to_dict()Returns the canonical dict representation of a Scrobble.
validate_dict()Check if the dictionary contains the required keys before creating a Scrobble from it.
Attributes