Skip to Content
Neural Network Projects with Python
book

Neural Network Projects with Python

by James Loy
February 2019
Beginner to intermediate
308 pages
7h 42m
English
Packt Publishing
Content preview from Neural Network Projects with Python

Questions

  1. When reading a CSV file using pandas, how does pandas recognize that certain columns are datetime?

We can use the parse_dates argument when reading the CSV file using the read_csv function in pandas.

  1. How can we filter a DataFrame to only select rows within a certain range of values, assuming that we have a DataFrame, df, and we want to select rows with height values within the range of 160 and 180?

We can filter a DataFrame like so:

df = df[(df['height'] >= 160) & (df['height'] <= 180)]

This returns a new DataFrame with range of height values between 160 and 180.

  1. How can we use code modularization to organize our neural network projects?

We can compartmentalize our functions using modular pieces of code. For example, in ...

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

Machine Learning with Python Cookbook

Machine Learning with Python Cookbook

Chris Albon

Publisher Resources

ISBN: 9781789138900Supplemental Content