1. Importing Library files

First of all, import the important library files, which is used in entire sentimental analysis. Like NLTK, pandas, numpy, sklearn, textblob etc. pandas are used for importing CSV files (used in next step), nltk is use for natural language processing, TextBlob is built on the shoulders of NLTK and Pattern, sklearn is use for feature extraction.

2. Importing Datasets

Before starting, let’s read the file from the dataset in order to perform different tasks on it. In the entire article, we will use the YouTube sentiment dataset from the Kaggle platform. https://www.kaggle.com/datasnaek/youtube#UScomments.csv).Here, comm is dataframe name, pd.read_csv( ) is pandas function which is used in import the entire dataset. UScomments.csv is file name, which is kept in same file path. error_bad_lines=False,(here, false means bad lines will be dropped from the DataFrame). comm.head() is use for display the first five row of data frame.