Professional Documents
Culture Documents
Aim:
Introduction to data analytics and Python fundamentals:
● Understanding the Data.
lines are: ['Name :- Jagtap Vaibhav\n', 'Class :- SE(E&TC)\n', 'Roll No :- EN2020'] total number of
lines in text file is; 3
Name :- Jagtap Vaibhav
Class :- SE(E&TC)
Roll No :- EN2020
Hello to all
Vaibhav Jagtap
#Multiple lines at a time
f=open("AB.txt","w")
n=int(input("How Many Lines="))
for i in range(n):
s=input("enter String:-")
f.write(s+"\n")
f.close()
df=pd.DataFrame({"Name":["SE","TE","BE"], "Class":[1,2,3],
"score":[77,66,55]})
print(df)
df.to_csv("vaibhav.csv")
0 SE
1
77
1 TE
#importing data
import pandas as pd
df=pd.read_csv(‘vaibhav.csv’)
print(df)
0 0 SE 1 7
7
1 1 TE 2 6
6
2 2 BE 3 55