Skip to Content
利用 Python 进行数据分析:原书第 3 版
book

利用 Python 进行数据分析:原书第 3 版

by Wes McKinney
November 2023
Intermediate to advanced
512 pages
11h 53m
Chinese
China Machine Press
Content preview from 利用 Python 进行数据分析:原书第 3 版
数据规整:连接、联合和重塑
|
245
参数 说明
how
连接方式
"inner""outer""left""right"
其中之一
默认为
"inner"
on
用于连接的列名
必须存在于左右两个 DataFrame 对象中
如果未指定
且也未指定其他连接键
则以
left
right
列名的交集作为连接键
left_on left
DataFrame 中用作连接键的列
可以是单列列名或列名的组
right_on right
DataFrame 中用作连接键的列
left_index
left
的行索引用作连接键
如果是
MultiIndex
则为多个键
right_index
right
的行索引用作连接键
sort
根据连接键
对合并后的数据进行排序
默认为
False
suffixes
如果列名重合
将字符串元组追加到列名的末尾
默认为
"_x""_y")。
例如
如果左右两个 DataFrame 对象都有
"data"
则结果中就是
"data_
x"
"data_y"
copy
如果为
False
可以在某些特殊情况下避免将数据复制到结果数据结构
默认总是复制
validate
确认是否为特定类型的合并
即一对一
一对多或多对多
完整细节请查
看该选项的文档字符串
indicator
添加特殊的列
_merge
用于指明每个行的来源
根据每行的连接数据的
来源
它的值为
"left_only""left_only"
"both"
其中之一
8.2.2
根据索引合并
在某些情况下,
DataFrame
中的连接键位于其索引(行标签)中。在这种情况下 ...
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

Effective Python 第3版 ―Pythonプログラムを改良する125項目

Effective Python 第3版 ―Pythonプログラムを改良する125項目

Brett Slatkin, 鈴木 駿

Publisher Resources

ISBN: 9787111726722