Search code examples
pythonldatopic-modelingpycaret

PyCaret NLP assign_model(lda) assigns topics on empty rows


I'm using pycaret to create_model(lda) and then using that for assign_model(lda). Not sure if I'm doing something that I'm not supposed to do during pre-processing. Any help is much appreciated

   #create model
   lda = create_model('lda')
   lda_df = assign_model(lda)
   lda_df

The resulting dataframe has the topics assigned on top rows where the rows are empty for other column values and the actual values are pushed below.

Top Few Rows with empty column values have topics assigned to them


Solution

  • Reset_index() solved this. There were some subsetting that was done earlier.