Skip to main content

DataITO

Python Logo

安装(install)

  • 安装开发版(Install development version)
py -m pip install --index-url https://test.pypi.org/simple/ --no-deps dataito
  • 安装稳定版( Install stable version )
pip install dataito

使用手册 (中文版)

Python数据输入(Input)、转换(transform)、输出(output),一行代码读取/转换多种格式的数据文件

dataito仅有三个函数,分别是read()、transform()、save(),具体参数及调用方式如下:

格式

  • 目前支持的读取格式

    • txt
    • xlsx
    • csv
    • json(仅支持结构化数据)
  • 目前支持的转换格式

    • dataframe (pandas)
    • array (numpy)
    • list
  • 目前支持的保存格式

    • xlsx(目前仅支持保存为xlsx,在考虑是否要增加自定义格式保存功能)

调用方式

  • read( )

    read(filepath)
    

    注:只能读取支持的文件格式(建议filepath之前加个r,具体看example)

  • transform( )

    transform(data,'parameter')
    

    parameter中填写为需要转换的目标数据类型,其与type(data)获取的数据类型的关系如下:

    type type(data)
    dataframe/pandas <class 'pandas.core.frame.DataFrame'>
    array/numpy <class 'numpy.ndarray'>
    list <class 'list'>
    >>> data= dataito.transform(data,'dataframe')
    >>> type(data) 
    <class 'pandas.core.frame.DataFrame'>
    >>> data= dataito.transform(data,'array')     
    >>> type(data)
    <class 'numpy.ndarray'>
    >>> data= dataito.transform(data,'list')      
    >>> type(data)
    <class 'list'>
    
  • save( )

    save(filepath)
    

    (建议filepath之前加个r,具体看example)

  • example

    import dataito
    
    filepath = r'data/data.xlsx'				#读取支持格式的数据文件
    
    data = dataito.read(filepath)				#调用函数读取(读取其他支持的格式也是这个函数)
    data= dataito.transform(data,'dataframe')	#数据格式转换为想要的格式(转换为其他支持的格式也是这个)
    dataito.save(data,r'D:\data\data.xlsx')		#保存在data文件夹(默认文件名为data)
    

User manual (English version)

format

Python data input (i), transform (t), output (o), a line of code to read / convert a variety of formats of data files

  • Currently supported read formats

    • txt
    • xlsx
    • csv
    • json (only supports structured data)
  • Currently supported conversion formats

    • dataframe
    • array (numpy)
    • list
  • Currently supported save formats

    • xlsx ( it only supports saving as xlsx. We are considering whether to add the function of saving in custom format.)

Call mode

  • read( )

    read(filepath)
    

    Note: only the supported file formats can be read (it is recommended to add r before filepath, see example for details)

  • transform( )

    transform(data,'parameter')
    

    parameter is the target data type to be converted, and its relationship with the data type obtained by type (data) is as follows:

    type type(data)
    dataframe/pandas <class 'pandas.core.frame.DataFrame'>
    array/numpy <class 'numpy.ndarray'>
    list <class 'list'>
    >>> data= dataito.transform(data,'dataframe')
    >>> type(data) 
    <class 'pandas.core.frame.DataFrame'>
    >>> data= dataito.transform(data,'array')     
    >>> type(data)
    <class 'numpy.ndarray'>
    >>> data= dataito.transform(data,'list')      
    >>> type(data)
    <class 'list'>
    
  • save( )

    save(filepath)
    

    (it is recommended to add r before filepath, see example for details)

  • example

    import dataito
    
    filepath = r'data/data.xlsx'				#Read data files in supported formats
    data = dataito.read(filepath)				#Call the function to read (read other supported formats as well as this function)
    data= dataito.transform(data,'dataframe')	#Convert the data format to the desired format (and other supported formats)
    dataito.save(data,r'D:\data\data.xlsx')		#Save in the data folder (the default file name is data). If the path is not written, the file is saved in the root directory
    

Release files for dataito 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dataito 1.0.2
File Size Uploaded
dataito-1.0.2.tar.gz 6.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dataito 1.0.2
File Interpreter ABI Platform
dataito-1.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 12.2 kB

Release files / dataito-1.0.2.tar.gz

Download URL dataito-1.0.2.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
6fb93119039f6053df5ce8ed8a833dba56ff5fd48739713a5146cf569d072a81
BLAKE2b-256 checksum
How to use checksums
1a2d1d3f5d1169006105bb061fcd65004a0a8f76cbc55bdc6cf241bbb20baa0b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.8.1 keyring/23.1.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.7

Release files / dataito-1.0.2-py3-none-any.whl

Download URL dataito-1.0.2-py3-none-any.whl
Size 6.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
54adba36ddbee2984f1e0f5052f41143b83c567e5ffe213568177b59b664571b
BLAKE2b-256 checksum
How to use checksums
a68bc2ab3d605322072331885d0c4a4c78155d5508963ccd0e240440ba1bb3a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.8.1 keyring/23.1.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.7

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page