SQA Tools Blog

Learn testing and automation, one article at a time

Free tutorials, solved practice problems and interview prep for QA and automation engineers: Python, Playwright, Selenium, SQL, Git and more.

1,677Articles
1,141Solved Python problems
7Topics
100%Free

Python practice articles

1,137 articles · page 41 of 95 · Clear filters
Python practice

Count NaN values

Write a pandas program to count NaN values. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Replace NaN with a value

Write a pandas program to replace NaN in a column with a fixed value. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Population per country

Write a pandas program to total the population per country from a data set. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Write a tab-separated file

Write a pandas program to write a DataFrame to a CSV file with a tab separator. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Reorder columns

Write a pandas program to change the order of columns. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Rename all columns

Write a pandas program to rename columns C1, C2, C3 to A, B, C. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Column headers

Write a pandas program to get a list of column headers. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Iterate over rows

Write a pandas program to iterate over the rows. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Add a column

Write a pandas program to add a salary column. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Delete rows

Write a pandas program to delete John's record. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Replace a value

Write a pandas program to replace John with Jim. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Sort by age

Write a pandas program to sort by age in ascending order. Step-by-step explanation, colour-coded code and real output.

1 min readRead →

Preparing for a QA interview?

Take free timed mock tests with answers and explanations.