Skip to content

Commit

Permalink
fix np.object
Browse files Browse the repository at this point in the history
  • Loading branch information
mdekstrand committed May 29, 2023
1 parent b7588e8 commit 9a10d4e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lenskit/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ def movies(self):
fn = self.path / 'movies.csv'
movies = pd.read_csv(fn, dtype={
'movieId': np.int32,
'title': np.object,
'genres': np.object
'title': object,
'genres': object,
})
movies.rename(columns={'movieId': 'item'}, inplace=True)
movies.set_index('item', inplace=True)
Expand Down Expand Up @@ -159,8 +159,8 @@ def tags(self):
tags = pd.read_csv(fn, dtype={
'movieId': np.int32,
'userId': np.int32,
'tag': np.object,
'timestamp': np.int32
'tag': object,
'timestamp': np.int32,
})
tags.rename(columns={'userId': 'user', 'movieId': 'item'}, inplace=True)
_log.debug('loaded %s, takes %d bytes', fn, tags.memory_usage().sum())
Expand Down Expand Up @@ -192,7 +192,7 @@ def tag_genome(self):
genome = pd.read_csv(fn, dtype={
'movieId': np.int32,
'tagId': np.int32,
'relevance': np.float64
'relevance': np.float64,
})
genome.rename(columns={'userId': 'user', 'movieId': 'item'}, inplace=True)
genome = genome.join(tags, on='tagId')
Expand Down

0 comments on commit 9a10d4e

Please sign in to comment.