title: Create sparse matrix from three datasets
body: <p>I have three datasets:</p>
  <pre><code>users_df = pd.read_csv('users.csv')
  books_df = pd.read_csv('books.csv')
  ratings_train_df = pd.read_csv('ratings_train.csv')
  </code></pre>
  <p>The first one describes all the users in the system. The second one describes all the books and the third one contains UserID and BookID and tells the rating the user gave to particular book.</p>
  <p>I now want to train <code>LifgtFM</code> model to predict new ratings which a particular user will give to a new book but LightFM works with sparse matrix:</p>
  <pre><code>model=LightFM(loss=&quot;warp&quot;)
  model.fit(..., epochs=30, num_threads=2)
  </code></pre>
  <p>How can I transform my datasets to an appropriate input for the model's <code>fit</code> function?</p>