Readin HTML using Pandas
Requirement already satisfied: lxml in /Users/sibbirahmmedsihan/opt/anaconda3/lib/python3.8/site-packages (4.6.1)
Requirement already satisfied: pandas in /Users/sibbirahmmedsihan/opt/anaconda3/lib/python3.8/site-packages (1.1.3) Requirement already satisfied: python-dateutil>=2.7.3 in /Users/sibbirahmmedsihan/opt/anaconda3/lib/python3.8/site-packages (from pandas) (2.8.1) Requirement already satisfied: pytz>=2017.2 in /Users/sibbirahmmedsihan/opt/anaconda3/lib/python3.8/site-packages (from pandas) (2020.1) Requirement already satisfied: numpy>=1.15.4 in /Users/sibbirahmmedsihan/opt/anaconda3/lib/python3.8/site-packages (from pandas) (1.19.2) Requirement already satisfied: six>=1.5 in /Users/sibbirahmmedsihan/opt/anaconda3/lib/python3.8/site-packages (from python-dateutil>=2.7.3->pandas) (1.15.0)
1
Dropping columns:
newdf=data.drop(columns=['Unnamed: 0', 'Unnamed: 1', 'Unnamed: 7'])
newdf.to_excel("newexcel.xlsx", index=None) #saving this to an excel
Reading file from an URL:
14
No comments:
Post a Comment