Skip to Main Content
Hands-On Data Analysis with NumPy and pandas
book

Hands-On Data Analysis with NumPy and pandas

by Curtis Miller
June 2018
Beginner to intermediate content levelBeginner to intermediate
168 pages
3h 40m
English
Packt Publishing
Content preview from Hands-On Data Analysis with NumPy and pandas

Filling missing information

We can use the fillna method to replace missing information in a series or DataFrame. We give fillna an object instructing the method how this information should be replaced. By default, the method creates a new DataFrame or series. We can give fillna a single value, a dict, a series, or a DataFrame. If given a single value, then all entries indicating missing information will be replaced with that value. A dict can be used for more advanced replacement schemes. The values of the dict could correspond to, say, columns of the DataFrame; think of it as telling how to fill missing information in each column. If a series is used for filling missing information in a series, then the past series tells how to fill particular ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hands-On Data Analysis with Pandas

Hands-On Data Analysis with Pandas

Stefanie Molin
Python: End-to-end Data Analysis

Python: End-to-end Data Analysis

Phuong Vothihong, Martin Czygan, Ivan Idris, Magnus Vilhelm Persson, Luiz Felipe Martins
Python: Data Analytics and Visualization

Python: Data Analytics and Visualization

Phuong Vo.T.H, Martin Czygan, Ashish Kumar, Kirthi Raman

Publisher Resources

ISBN: 9781789530797Supplemental Content