text_html_output_1.png
from nltk.stem.porter import PorterStemmer

import pandas as pd

import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

import pandas as pd
df = pd.read_csv('/kaggle/input/midjourney-v5-prompts-and-links/MJ_Part3.csv')
df

df = df.drop(['AuthorID', 'Author', 'Date', 'Reactions', 'Attachments'], axis=1)
df

df = df.dropna()
df

df = df[df['Content'] != 'No Match']
df

import nltk
from nltk.stem.porter import PorterStemmer
ps = PorterStemmer()

def stem(text):
    y = []
    for i in text.split():
        y.append(ps.stem(i))
    return ' '.join(y)

df['Content'] = df['Content'].apply(stem)