Skip to Content
数据科学实战手册
book

数据科学实战手册

by Posts & Telecom Press, Tony Ojeda, Sean Patrick Murphy, Bengfort Benjamin
May 2024
Intermediate to advanced
357 pages
5h 3m
Chinese
Packt Publishing
Content preview from 数据科学实战手册

第7章 运用汽车数据进行可视化分析(Python)

这一章包含以下主要内容。

  • IPython入门
  • 熟悉IPython Notebook
  • 准备分析汽车油耗
  • 用Python熟悉并描述汽车油耗数据
  • 用Python分析汽车油耗随时间变化趋势
  • 用Python调查汽车的制造商和型号

在介绍R语言的第1章(第2章“汽车数据的可视化分析(R)”)中,我们介绍了一个运用R语言的分析项目,该项目分析汽车油耗表现的数据。数据可以通过http://www.fueleconomy.govfeg/epadata/ vehicles.csv.zip获得。它包含美国各制造商各型号汽车不同时间点的油耗表现参数。除了油耗表现外,它还包含各汽车型号丰富的其他特性和属性,为我们整理和分组分析数据以发现有趣的趋势和关系提供了机会。

和之前的R语言那一章不同的是,我们全部使用Python进行分析。而这个数据科学项目的各个流程所需要的问题和步骤则和之前保持一致。通过这一章的学习,你会看到两种语言在进行几乎相同分析时的相似点和区别。

在第6章“运用税务数据进行应用导向的数据分析(Python)”中,我们几乎仅用了Python以及一些简单的库,比如NumPy和SciPy的帮助。我们通过Python命令行 —— 又称为Read-Eval-Print Loop(REPL)—— 或者可执行的脚本文件来实现我们的分析。而在这一章中,我们将见识到Python作为脚本语言的另一种不同用法 —— 一种更类似于R语言的交互式的方式。我们这里会向读者介绍Python的一种非官方的交互式环境IPython和IPython notebook,并说明如何在这个环境下编写可读性强、记录详尽的分析脚本。此外,我们会利用相对较新但功能强大的pandas库的数据分析能力以及它提供的极为有用的数据框data ...

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.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Python编程入门与实战

Python编程入门与实战

Posts & Telecom Press, Fabrizio Romano
软件开发实践:项目驱动式的Java开发指南

软件开发实践:项目驱动式的Java开发指南

Raoul-Gabriel Urma, Richard Warburton
编写整洁的Python代码(第2版)

编写整洁的Python代码(第2版)

Posts & Telecom Press, Mariano Anaya

Publisher Resources

ISBN: 9781836206774