Skip to content
Advertisement

Tag: lightfm

DataError: No numeric types to aggregate pandas pivot

I have a pandas dataframe like this: and I need to convert it to a Matrix like they do here: https://github.com/tr1ten/Anime-Recommender-System/blob/main/HybridRecommenderSystem.ipynb Cell 13. So I did the following: user_training_csr = csr_matrix(user_training_interaction.values) But I get this error: What am I missing? Answer The Pandas Documentation states: While pivot() provides general purpose pivoting with various data types (strings, numerics, etc.), pandas also

Advertisement