博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
DataFrame
阅读量:5821 次
发布时间:2019-06-18

本文共 2460 字,大约阅读时间需要 8 分钟。

1109148-20170228222038141-974212595.png

help(pd.concat)

Help on function concat in module pandas.tools.merge:

 
  1. help(pd.concat)
  2. Help on function concat in module pandas.tools.merge:
  3. concat(objs, axis=0, join='outer', join_axes=None, ignore_index=False, keys=None, levels=None, names=None, verify_integrity=False, copy=True)
  4.    Concatenate pandas objects along a particular axis with optional set logic
  5.    along the other axes. Can also add a layer of hierarchical indexing on the
  6.    concatenation axis, which may be useful if the labels are the same (or
  7.    overlapping) on the passed axis number
  8. 是按行组装多个表格的
  9.    Parameters
  10.    ----------
  11.    objs : a sequence or mapping of Series, DataFrame, or Panel objects
  12.        If a dict is passed, the sorted keys will be used as the `keys`
  13.        argument, unless it is passed, in which case the values will be
  14.        selected (see below). Any None objects will be dropped silently unless
  15.        they are all None in which case a ValueError will be raised
  16.    axis : {
    0, 1, ...}, default 0
  17.        The axis to concatenate along
  18.    join : {
    'inner', 'outer'}, default 'outer'
  19.        How to handle indexes on other axis(es)
  20.    join_axes : list of Index objects
  21.        Specific indexes to use for the other n - 1 axes instead of performing
  22.        inner/outer set logic
  23.    verify_integrity : boolean, default False
  24.        Check whether the new concatenated axis contains duplicates. This can
  25.        be very expensive relative to the actual data concatenation
  26.    keys : sequence, default None
  27.        If multiple levels passed, should contain tuples. Construct
  28.        hierarchical index using the passed keys as the outermost level
  29.    levels : list of sequences, default None
  30.        Specific levels (unique values) to use for constructing a
  31.        MultiIndex. Otherwise they will be inferred from the keys
  32.    names : list, default None
  33.        Names for the levels in the resulting hierarchical index
  34.    ignore_index : boolean, default False
  35.        If True, do not use the index values along the concatenation axis. The
  36.        resulting axis will be labeled 0, ..., n - 1. This is useful if you are
  37.        concatenating objects where the concatenation axis does not have
  38.        meaningful indexing information. Note the index values on the other
  39.        axes are still respected in the join.
  40.    copy : boolean, default True
  41.        If False, do not copy data unnecessarily
  42.    
  43.    Notes
  44.    -----
  45.    The keys, levels, and names arguments are all optional
  46.    
  47.    Returns
  48.    -------
  49.    concatenated : type of objects
1109148-20170228222038876-1205916930.png
1109148-20170228222039470-1667018672.png
1109148-20170228222040329-714363778.png

series 是一个有序的字典,因此索引即可是关键字,也可是下标序号

1109148-20170228222041220-548131391.png
1109148-20170228222042048-1164270731.png

series 的索引不知是整数:

标签名 标签名的list 标签名的切片(尾端包含)

下标 下标的list 下标的切片(尾端不包含)

布尔型数组

1109148-20170228222045157-1137845815.png

1109148-20170228222045923-1555789739.png

1109148-20170228222048266-1932874745.png
1109148-20170228222049126-317071402.png
1109148-20170228222050063-217726793.png
1109148-20170228222051751-1748460617.png

即一个有 一个没有的索引 运算和为nan

1109148-20170228222053688-2135056706.png
1109148-20170228222054470-451763343.png
1109148-20170228222055563-1538418603.png
1109148-20170228222056313-694914285.png
1109148-20170228222058501-1665949198.png
1109148-20170228222059595-1683195272.png
1109148-20170228222100376-25518544.png
1109148-20170228222100860-1899087943.png
1109148-20170228222101548-2067238490.png
1109148-20170228222102001-1622830809.png

转载于:https://www.cnblogs.com/zzxx-myblog/p/6481322.html

你可能感兴趣的文章
Formik官方应用案例解析(四)组件生命周期事件
查看>>
【Win10应用开发】自适应磁贴中的分组
查看>>
学习vi和vim编辑(3):一个简单的文本编辑器(2)
查看>>
一小时了解数据挖掘⑤数据挖掘步骤&常用的聚类、决策树和CRISP-DM概念
查看>>
python之数据库操作(sqlite)
查看>>
Kafka入门教程
查看>>
%( $# > 1 %? if (tid() in trace) %) 是什么意思
查看>>
sublime text之sublimeCodeIntel 的配置
查看>>
Linux:Vim
查看>>
github page 和 hexo 搭建在线博客
查看>>
iOS开发系列--Objective-C之协议、代码块、分类
查看>>
Android-onInterceptTouchEvent()和onTouchEvent()总结
查看>>
lintcode:strStr 字符串查找
查看>>
设置Android Studio启动时可选最近打开过的工程
查看>>
I.MX6 eMMC 中启动U-boot存放的首地址
查看>>
Codeforces Round #326 (Div. 2) B. Duff in Love 分解质因数
查看>>
从0开始学Java——JSP&Servlet——如何部署web应用程序
查看>>
劝学篇
查看>>
Java设计模式2:简单工厂模式
查看>>
LPC43xx SGPIO Pattern Match Mode
查看>>