- Write our first line of code in Python
- Create a simple dataset
- Install and load the Pandas library
Welcome
Welcome to the course! We are glad you are here. Learning Python is one of the best ways you can work with data and create charts. Python is a free and open-source software and has helped many people get started in data analytics. We hope you will have fun along the way and learn a lot.
This course has 7 sections. Each section has a set of examples, exercises, self-assessments, and quizzes to help you learn. As you complete the self-assessments and quizzes, the course progress will get updated. By completing all the quizzes, you’ll earn a certificate of completion.
- Introduction
- Selecting columns
- Visualizing data
- Filtering rows
- Summarizing & grouping data
- Creating columns
- Conclusion
What is Python and Pandas
Python is a versatile programming language widely used in data science, web development, and many other fields. It’s known for its simplicity and readability.
People extend Python by creating libraries. Pandas is a powerful library for data manipulation and analysis in Python, similar to the Tidyverse in R.
Your first line of code
The following code is interactive. You can run the code by clicking the run button. The code will print “Hello World!” in the console.
It’s your turn now. Type print("Hello World!")
in the code editor below and click the run button.
Exploring an Example dataset
In this course, we’ll create a simple dataset and use it to learn Python and Pandas. This is a dataset of flowers with their names, height (centimeters), season, sunlight (hours), and growth rate.
name | height | season | sunlight | growth |
---|---|---|---|---|
Poppy | 75 | Spring | 8.3 | fast |
Rose | 150 | Summer | 6.4 | slow |
Zinnia | 60 | Summer | 8.7 | fast |
Peony | 90 | Spring | 7.2 | slow |
To create a DataFrame in Python using Pandas, we can use the pd.DataFrame()
function.
Try running the following code.
Installing and loading the Pandas library
To install the Pandas library, you need to run this command in your terminal or command prompt. You only need to do this once on your computer.
pip install pandas
Now, whenever you are using Python and need to use Pandas, make sure to import the library by adding this line at the beginning of your script and running it.
- Print “Hello World!” in the console
- Create a simple dataset using Pandas
- Install and import the Pandas library
Loading...
Loading...