Your First Pandas Lab

PandasPandasBeginner
Practice Now

Introduction

Hi there, welcome to LabEx! In this first lab, you'll learn the classic "Hello, World!" program in Pandas.

Click the Continue button below to start the lab.


Skills Graph

%%%%{init: {'theme':'neutral'}}%%%% flowchart RL pandas(("`Pandas`")) -.-> pandas/DataSelectionGroup(["`Data Selection`"]) python(("`Python`")) -.-> python/DataStructuresGroup(["`Data Structures`"]) python(("`Python`")) -.-> python/ModulesandPackagesGroup(["`Modules and Packages`"]) python(("`Python`")) -.-> python/DataScienceandMachineLearningGroup(["`Data Science and Machine Learning`"]) python(("`Python`")) -.-> python/FunctionsGroup(["`Functions`"]) pandas/DataSelectionGroup -.-> pandas/select_columns("`Select Columns`") python/DataStructuresGroup -.-> python/lists("`Lists`") python/DataStructuresGroup -.-> python/tuples("`Tuples`") python/ModulesandPackagesGroup -.-> python/importing_modules("`Importing Modules`") python/DataScienceandMachineLearningGroup -.-> python/numerical_computing("`Numerical Computing`") python/DataScienceandMachineLearningGroup -.-> python/data_analysis("`Data Analysis`") python/FunctionsGroup -.-> python/build_in_functions("`Build-in Functions`") subgraph Lab Skills pandas/select_columns -.-> lab-92727{{"`Your First Pandas Lab`"}} python/lists -.-> lab-92727{{"`Your First Pandas Lab`"}} python/tuples -.-> lab-92727{{"`Your First Pandas Lab`"}} python/importing_modules -.-> lab-92727{{"`Your First Pandas Lab`"}} python/numerical_computing -.-> lab-92727{{"`Your First Pandas Lab`"}} python/data_analysis -.-> lab-92727{{"`Your First Pandas Lab`"}} python/build_in_functions -.-> lab-92727{{"`Your First Pandas Lab`"}} end

Hello Pandas

Let's start by importing the Pandas library. Open a new terminal and type:

python3
lab-hello-world-1-1

This will open a Python interpreter. Now, let's import Pandas:

import pandas as pd

Pandas is now imported and ready to use. Let's create a DataFrame. We'll start with a simple list of numbers:

df = pd.DataFrame([10, 20, 30, 40], columns=['numbers'], index=['a', 'b', 'c', 'd'])

We can print the DataFrame by typing:

print(df)

Summary

Coungratulations! You have completed your first LabEx Lab.

If you want to learn more about LabEx and how to use it, you can visit our Support Center . Or you can watch the video to learn more about LabEx.

Programming is a long journey, but Next Lab is just one click away. Let's do it!

Other Pandas Tutorials you may like