用python 3编写的robotframework的csv库

robotframework-csvlib的Python项目详细描述


robotframework csvlib

用python 3编写的robotframework的csv库

快速关键字概述

Read CSV As Single List 
    Arguments:
        Filepath
        Delimiter (optional)
    Returns:
        A single list with all values.
Read CSV As List 
    Arguments:
        Filepath
        Delimiter (optional)
    Returns:
        A list containing all rows as lists.
Read CSV As Dictionary 
    Arguments:
        Filepath
        Name of key column
        Name(s) of value column(s)
        Delimiter (optional)
    Returns:
        A dictionary with the key column a key and the value column(s) as value. 
        If there are multiple value columns the value will be a list containing all values.

示例

*** Settings ***
Library  CSVLib

*** Test Cases ***
Test CSV
	${singlelist}=		Read CSV As Single List		test.csv
	log to console		${singlelist}

	${list}=		read csv as list		test.csv
	log to console		${list}

	${dict}=		read csv as dictionary		test_dict.csv		Animal		Legs		,
	log to console		${dict}

	${value}=		create list			Legs			Eyes
	${dictWList}=		read csv as dictionary		test_dict1.csv		Animal		${value}	,
	log to console		${dictWList}

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java如何在构造函数外部添加鼠标侦听器   java如何使用比较器对列表进行排序以正确排序空值?   javajavax。由于javax,邮件“535.7.3身份验证失败”。邮件升级(v1.3.1至v1.5.2)   java将arraylist流到固定的二维数组中并打印?   RecyclerView适配器上的java上下文   java如何为此Twitter API为KafkaProducer建立连接   java Spring安全性重写WebSecurity配置适配器的配置(AuthenticationManagerBuilder)是否会影响全局应用程序?   线程“awteventque0”NullPointerException中的java异常   if条件中的null值和null指针异常java   java树集<Object>允许相同类型的多个对象   java定义类;我认不出   字符串java replaceAll()   JAVAutil。scanner(Java)读取文件时如何跳过空格?   java在swing中关闭flash屏幕   java在Wildfly 16中的应用程序中加载pk12文件   有没有工具可以自动生成屏幕抓取的Java代码   创建意图时,java方法getParcelableExtra()返回null   将数据从java传递到jsp   java Android Studio |永久保存布局