This commit is contained in:
Yevhenii Poliakov 2023-05-14 21:48:07 +02:00
parent b0f6275019
commit af22e68a9f

View File

@ -16,10 +16,10 @@ X = data[['movie title', 'User Rating', 'Director', 'Top 5 Casts', 'Writer']]
#y = data['Rating'].apply(lambda x: float(x) if isinstance(x, (int, float)) else np.nan) # Convert 'Rating' column to float data type
#y = pd.Series(data['Rating'], dtype=float)
y = data['Rating'].astype('float64')
y = y.fillna(y.mean())
y = np.array(y)
#y = y.fillna(y.mean())
#y = np.array(y)
print("Unique values in 'Rating' column:", data['Rating'].unique())
print("Data type of 'Rating' column:", y.dtype)