Code >
file.py
import pandas as pd
data = [['Python','Basics',5], ['Python', 'OOPs',6], ['Python','Exception Handling',2] ,
['Python', 'Database',4],
['Python', 'REgular Expressions',3],
['Python', 'Data Analysis',6] ]
df = pd.DataFrame(data, columns = ['Category', 'Name','No of lecture'])
print(df )
Output >
Output
Category Name No of lecture
Python Basics 5
Python OOPs 6
Python Exception Handling 2
Python Database 4
Python REgular Expressions 3
Python Data Analysis 6