Skip to main content

Course

Introduction to Importing Data in Python

Basic3 hr

Learn to import data into Python from various sources, such as Excel, SQL, SAS and right from the web.

Python3 hr15 videos50 Exercises3,900 XP330K+Statement of accomplishment

Create Your Free Account

Continue with Google
or
By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.

Loved by learners at thousands of companies

Training a Team?

Try for Business

Course Description

As a data scientist, you will need to clean data, wrangle and munge it, visualize it, build predictive models, and interpret these models. Before you can do so, however, you will need to know how to get data into Python. In this course, you'll learn the many ways to import data into Python: from flat files such as .txt and .csv; from files native to other software such as Excel spreadsheets, Stata, SAS, and MATLAB files; and from relational databases such as SQLite and PostgreSQL.The videos contain live transcripts you can reveal by clicking "Show transcript" at the bottom left of the videos. The course glossary can be found on the right in the resources section. To obtain CPE credits you need to complete the course and reach a score of 70% on the qualified assessment. You can navigate to the assessment by clicking on the CPE credits callout on the right.

Feels like what you want to learn?

Start Course for Free

What you'll learn

  • Connect to an SQLite database using SQLAlchemy, execute SELECT queries, and load query results into pandas DataFrames
  • Evaluate SQL JOIN operations that merge related tables and confirm that the combined data are correctly loaded into a DataFrame.
  • Recognize the file structures, delimiters, and headers that characterize flat files and hierarchical HDF5 formats
  • Use appropriate Python functions and libraries for importing plain text, CSV, Excel, SAS, Stata, MATLAB, HDF5, and pickled data files
  • Use NumPy to load homogeneous numeric data, use pandas to load tabular data, and convert between NumPy arrays and pandas DataFrames when needed.

Prerequisites

Curriculum

Course outline

2

Importing data from other file types

You've learned how to import flat files, but there are many other file types you will potentially have to work with as a data scientist. In this chapter, you'll learn how to import data into Python from a wide array of important file types. These include pickled files, Excel spreadsheets, SAS and Stata files, HDF5 files, a file type for storing large quantities of numerical data, and MATLAB files.
Start Chapter

Introduction to Importing Data in Python

Course
Complete

Earn Statement of Accomplishment

Enroll Now

Grow your data skills with DataCamp for Mobile

Make progress on the go with our mobile courses and daily 5-minute coding challenges.