DataFrame

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值