Preview a DataFrame
Pandas is imported as pd. The seeded df contains three learners and their scores.
df.head()Practice Pandas online with small datasets. Explore Series, tabular DataFrames, and summary statistics before working with CSV files in a real Python lab.
Start here
Load a task into the terminal, then press Enter to see the result. Each example works in the introductory session on this page.
Pandas is imported as pd. The seeded df contains three learners and their scores.
df.head()Return the number of rows and columns.
df.shapeInspect the column labels before selecting data.
df.columnsRead the score column as a Series.
df["score"]Find the average score in the sample dataset.
df["score"].mean()Keep learners with a score of at least 80.
df[df["score"] >= 80]Sort the sample rows by score.
df.sort_values("score")Inspect count, mean, spread, and percentiles for the score column.
df.describe()No setup needed
Practice Pandas online with small datasets. Explore Series, tabular DataFrames, and summary statistics before working with CSV files in a real Python lab.
Start with the short command exercises above. When you are ready for a project, open the linked LabEx lab to work with real tools in an online Linux environment, with step-by-step guidance and immediate feedback.
Keep learning
Build on your Pandas experiments with a structured skill tree. Explore the skills, choose a guided lab, and practice each concept in an online environment.
Explore Series, DataFrames, selection, and summary statistics. Continue through the Data Science Skill Tree and launch a Python lab for working with datasets and the installed Pandas library.
The introductory exercises are free. Sign in for a complete LabEx environment; session duration and resources depend on your lab and plan.
No local installation is required. Sign in and open the lab in a modern browser. Follow the lab instructions to configure software inside the environment.
This preview supports a limited command set. Sign in and launch the Python lab for more commands, packages and services. Available software and permissions depend on the selected lab.
Follow the Data Science Skill Tree for guided labs and challenges. Practice regularly, inspect command output and ask Labby for help.
Your next step
Continue with real tools, guided labs, and Labby assistance.