Are you a candidate looking to sharpen your skills? Try our practice tests or view sample interview questions & Get hired by the best. Click Here×

Python Pandas Online Test

Topics Covered

  • Panda Dataframe
  • Data sources in Python
  • Tools and Services
  • Popularity Indexes in Pandas

Useful for hiring

  • Python Developer
  • Python Data Engineer

Start hiring job-fit candidates using this assessment


"We are impressed by the caliber, depth, and breadth of the assessments provided by Interview Mocha. With Interview Mocha's online proctoring & powerful reports, we are able to hire quality candidates overcoming geographical barriers."

Megan Akhras, J'Excelle,Canada,
Co-founder & director

How would you drop all rows in a dataframe - "df" which have less than 5 non-null values?

    • df.dropna(axis=1,threshold=5)

    • df.dropna(axis=1,count=4)

    • df.dropna(axis=0,count=4)

    • df.dropna(axis=1,thresh=5)


The pandas dataframe of the shown dataset is "df". Pandas is imported in your program as "pd".

How do you obtain the count of males and females for different job roles as shown in the image below?

    • print pd.count(df.Role, df.Gender)

    • print pd.series(df.Role, df.Gender)

    • print pd.frequency(df.Role, df.Gender)

    • print pd.crosstab(df.Role, df.Gender)

Good News! You can customize this test as per your requirement

  • Choose and add questions from Interview Mocha question libraries

  • Add your own set of questions

  • Customize test settings like duration, number of questions, passing score, web proctoring and much more

  • Mail us at to create a custom test

Looking for a tailor-made test, to suit your assessment needs?

Get in touch

Global companies using Mocha assessments

  • altran
  • credit suisse
  • sephora
  • nielsen
  • capgemini
  • akamai

How Mocha assessments are brewed

Speed up your IT recruitment with Interview Mocha

  • 500+ IT skill tests
  • 20+ coding languages
  • 50+ domain knowledge tests
  • 100+ digital 2.0 skill tests
  • Customer focus aptitude tests
  • Enterprise ready features & more...

Why hiring managers and recruiters across the globe love Interview Mocha

Take your first step to hire job fit candidates