Getting an error while deploying app to streamlit, but it works perfectly when ran locally

clus = df[df[‘Player’] == player][‘cluster’]
df = df[df[‘cluster’] == int(clus)]
Error: TypeError: cannot convert the series to <class ‘int’>

This piece of code works fine in the local version, but I get this error when trying to deploy the code from github. What could the issue be?
The df[‘cluster’] column is a column to which I have assigned cluster numbers after doing K-Means clustering.

Trying to reboot the app, it is now stuck here: