pandas.read_csv

原型

pandas.read_csv(filepath_or_buffer, sep=', ', delimiter=None, header='infer', names=None, index_col=None, usecols=None, squeeze=False, prefix=None, mangle_dupe_cols=True, dtype=None, engine=None, converters=None, true_values=None, false_values=None, skipinitialspace=False, skiprows=None, nrows=None, na_values=None, keep_default_na=True, na_filter=True, verbose=False, skip_blank_lines=True, parse_dates=False, infer_datetime_format=False, keep_date_col=False, date_parser=None, dayfirst=False, iterator=False, chunksize=None, compression='infer', thousands=None, decimal='.', lineterminator=None, quotechar='"', quoting=0, escapechar=None, comment=None, encoding=None, dialect=None, tupleize_cols=False, error_bad_lines=True, warn_bad_lines=True, skipfooter=0, skip_footer=0, doublequote=True, delim_whitespace=False, as_recarray=False, compact_ints=False, use_unsigned=False, low_memory=True, buffer_lines=None, memory_map=False, float_precision=None)

参数很多,下面就常用的参数给出说明,详细请参考panda文档 :

filepath_or_buffer : 要读取的csv文件的URL,本地或者远程文件均可。

header : int or list of ints, default ‘infer’

Row number(s) to use as the column names, and the start of the data. Default behavior is as if set to 0 if no names passed, otherwise None. Explicitly pass header=0 to be able to replace existing  names. The header can be a list of integers that specify row locations for a multi-index on the columns e.g. [0,1,3]. Intervening rows that are not specified will be skipped (e.g. 2 in this example is skipped). Note that this parameter ignores commented lines and empty lines if skip_blank_lines=True, so header=0 denotes the first line of data rather than the first line of the file.

names : array-like, default None

List of column names to use. If file contains no header row, then you should explicitly pass header=None. Duplicates in this list are not allowed unless mangle_dupe_cols=True, which is the default.

mangle_dupe_cols : boolean, default True

Duplicate columns will be specified as ‘X.0’...’X.N’, rather than ‘X’...’X’. Passing in False will cause data to be overwritten if there are duplicate names in the columns.

skip_blank_lines : boolean, default True

If True, skip over blank lines rather than interpreting as NaN values

返回值:Read CSV (comma-separated) file into DataFrame

转载于:https://www.cnblogs.com/zhuangliu/p/6374853.html

panda.read_csv的常用参数说明相关推荐

  1. R语言使用plot函数和lines函数可视化线图(line plot)时、图之间的主要区别是由选项type产生的、type参数常用参数说明、不同type生成的可视化图像对比

    R语言使用plot函数和lines函数可视化线图(line plot)时.图之间的主要区别是由选项type产生的.type参数常用参数说明.不同type生成的可视化图像对比 目录

  2. 【解决方法】Panda read_csv()把第一行的数据变成了列名,怎么处理

    前言 有些时候,我们会遇到很多这样的数据,比如,这个csv的第一行并不是我们想象中的那样是一个列名.那样,我们处理数据的时候,就会出现问题,第一个不一致了嘛. 解决方案1 调用csv库,自己重新编写读 ...

  3. 发那科2021参数_FANUC常用参数说明

    包括运行速度,到位宽度,加减速时间常数,软限位,运行 / 停止时的位置偏差,和显示有 关的参数等,参照如下常用参数表(表2)设定. 表2常用参数说明 参数含义 FS-OI MA/MB FS-OI-Ma ...

  4. 质控软件fastp常用参数说明

    文章目录 写在前面 参考文献 fastp功能 类似软件比较 简单示例 常用参数说明 UMI去除 质量过滤 长度过滤 低复杂度过滤 adapter过滤 通过质量值过滤每条read ployG/ployX ...

  5. docker run常用参数说明

    创建容器常用的参数说明:创建容器命令:docker run-i:表示运行容器-t:表示容器启动后会进入其命令行.加入这两个参数后,容器创建就能登录进去.即分配一个伪终端.--name :为创建的容器命 ...

  6. Panda read_csv() 在anaconda中读入中文列时显示为乱码的问题

    一开始怎么搞都没有用 df0 = pd.read_csv(p1,,encoding='utf-8) 报错 df0 = pd.read_csv(p1,engine='python') 打开全是乱码 df ...

  7. npm install 常用参数说明

    描述 npm install 是用来安装包和相关的依赖包的,如果存在package-lock文件,或是 shrinkwrap文件,yarn.lock文件,依赖包的安装将被其锁定,如果存在多个,则优先级 ...

  8. NFS配置全新设置常用参数说明

    本文转自sandshell博客51CTO博客,原文链接http://blog.51cto.com/sandshell/1955907如需转载请自行联系原作者 sandshell

  9. DBCP连接池配置常用参数说明

    参数 默认值 说明 username \ 传递给JDBC驱动的用于建立连接的用户名 password \ 传递给JDBC驱动的用于建立连接的密码 url \ 传递给JDBC驱动的用于建立连接的URL ...

最新文章

  1. 002_生活口语积累
  2. zTree 显示为‘aa’,当选择aa时,传的参数为‘22’
  3. 找不到atlapp.h的解決方法
  4. python 的dict的append()?
  5. UOJ #585. 新年和多米诺
  6. Java性能调优调查结果(第三部分)
  7. NOIP2018划水记
  8. 多数人只有一种工资收入,想赚更多钱,只有去做副业
  9. 基于公司云平台的素材归档系统(一)
  10. 一文看尽中亦科技EVO-ITSM 3.0新品发布会
  11. CABAC基于上下文的自适应二进制熵编码
  12. 百度关键词模拟发包php程序,仿百度的关键词匹配搜索示例
  13. 一个简单的WEB网页制作作业——黑色的山河旅行社网站(5个页面)HTML+CSS+JavaScript
  14. 第三方支付,微信支付及支付宝的一些入门了解
  15. 机房收费系统(一)可行性研究报告
  16. 解决VMWare启动虚拟机出现错误“该虚拟机似乎正在使用中,请按“获取所有权(T)”按钮获取它的所有权。”
  17. 区块链赚钱攻略:最新干货 区块链人士必读!
  18. 微信签到 表单 mysql_java做的一个简易的微信签到系统
  19. 取消Outlook脱机工作
  20. Browsers Series_2_Firefox

热门文章

  1. 《Head First Java》读书笔记(3) - 异常和IO
  2. Apache Ant安装 验证
  3. (最小生成树)Truck History --POJ -- 1789
  4. 与Google用户帐户集成
  5. 仿苹果的导航,有点凹陷的感觉
  6. 父窗口与子窗口的数据传递问题
  7. html如何让左右字段不能编辑,HTML中让表单input等文本框为只读不可编辑的方法...
  8. Hibernate validation annonation
  9. leetcode算法题--唯一元素的和
  10. 2 - 前端基础--CSS 选择器