title: How to solve c = cov(x, y, rowvar) RuntimeWarning: Degrees of freedom <= 0 for slice error in python 3.8?
body: <p>I am following a tutorial to build a recommendation system in python from the below link. I'm using python 3.8 to build it.</p>
  
  <p><a href="https://stackabuse.com/creating-a-simple-recommender-system-in-python-using-pandas/" rel="nofollow noreferrer">https://stackabuse.com/creating-a-simple-recommender-system-in-python-using-pandas/</a></p>
  
  <pre><code>import numpy as np
  np.seterr(divide='ignore', invalid='ignore')
  import pandas as pd
  pd.set_option('display.max_rows', 500)
  pd.set_option('display.max_columns', 500)
  pd.set_option('display.width', 1000)
  
  ratings_data = pd.read_csv("E:/Python/ml-latest-small//ratings.csv")
  ratings_data.head()
  
  movie_names = pd.read_csv("E:/Python/ml-latest-small//movies.csv")  
  movie_names.head()
  
  movie_data = pd.merge(ratings_data, movie_names, on='movieId')
  movie_data.head()
  
  
  movie_data.groupby('title')['rating'].mean().head()
  
  movie_data.groupby('title')['rating'].mean().sort_values(ascending=False).head() 
  
  movie_data.groupby('title')['rating'].count().sort_values(ascending=False).head()
  
  ratings_mean_count = pd.DataFrame(movie_data.groupby('title')['rating'].mean())
  ratings_mean_count['rating_counts'] = pd.DataFrame(movie_data.groupby('title')['rating'].count())
  ratings_mean_count.head()
  
  user_movie_rating = movie_data.pivot_table(index='userId', columns='title', values='rating')
  user_movie_rating.head()
  
  forrest_gump_ratings = user_movie_rating['Forrest Gump (1994)']
  forrest_gump_ratings.head()
  
  movies_like_forest_gump = user_movie_rating.corrwith(forrest_gump_ratings)
  
  corr_forrest_gump = pd.DataFrame(movies_like_forest_gump, columns=['Correlation'])  
  corr_forrest_gump.dropna(inplace=True)  
  corr_forrest_gump.head()
  </code></pre>
  
  
  
  <p>I am getting the following error due to this line.</p>
  
  <p><strong>movies_like_forest_gump = user_movie_rating.corrwith(forrest_gump_ratings)</strong> </p>
  
  <p><a href="https://i.stack.imgur.com/oEtUp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oEtUp.png" alt="enter image description here"></a></p>
  
  <p>Can someone help me to solve this issue?</p>