ScrobbleLog#

Constructor#

ScrobbleLog(df, *[, meta, update_meta, ...])

Class representing a scrobble log, i.e. a sequence of scrobbles.

Attributes#

ScrobbleLog.df

DataFrame containing scrobbles, normalised with required columns and dtypes.

ScrobbleLog.meta

A dictionary containing the following metadata:

ScrobbleLog.username

The username for the ScrobbleLog

ScrobbleLog.tz

The timezone for the ScrobbleLog.

Alternative Constructors#

ScrobbleLog.from_scrobble(scrobble, meta, ...)

Create a ScrobbleLog from a Scrobble.

ScrobbleLog.from_dict(data[, orient])

Create a ScrobbleLog from a canonical dict representation.

Transform#

ScrobbleLog.append(scrobbles[, drop_duplicates])

Append scrobble(s) to a ScrobbleLog.

ScrobbleLog.tz_convert(tz[, inplace])

Convert ScrobbleLog timezone to another timezone.

ScrobbleLog.to_dict([orient])

Canonical dict representation of the ScrobbleLog

Indexing and Filtering#

ScrobbleLog.head([n])

Create a ScrobbleLog containing the first n scrobbles from the original.

ScrobbleLog.tail([n])

Create a ScrobbleLog containing the last n scrobbles from the original.

ScrobbleLog.filter_by_date([start, end, ...])

Create a ScrobbleLog filtered by date.

Charts and Stats#

ScrobbleLog.top_charts([kind])

Get top n tracks/artists/albums by number of scrobbles.