No products in the cart.

Write Code to add, delete, and …

CBSE, JEE, NEET, CUET

CBSE, JEE, NEET, CUET

Question Bank, Mock Tests, Exam Papers

NCERT Solutions, Sample Papers, Notes, Videos

Write Code to add, delete, and rename a column in given DataFrame. Df=pd.DataFrame({“A”:[1,2,3],”B”:[4,5,6]})
  • 2 answers

Nidhi M 3 years, 9 months ago

print ("Deleting another column using POP function:") df.pop('two') print df

Nidhi M 3 years, 9 months ago

print ("Adding a new column by passing as Series:") df['three']=pd.Series([10,20,30],index=['a','b','c']) print df
http://mycbseguide.com/examin8/

Related Questions

Founder of python
  • 2 answers

myCBSEguide App

myCBSEguide

Trusted by 1 Crore+ Students

Test Generator

Test Generator

Create papers online. It's FREE.

CUET Mock Tests

CUET Mock Tests

75,000+ questions to practice only on myCBSEguide app

Download myCBSEguide App