Saravanan666/pypi-org huggingface dataset:
Package: csv2odoo
csv2odoois a Python converter from thecsvformat toOpenObjectdatamodels.csv2odoois an easy way to import records from heterogeneous datas by editing
a simple script as the manner ofOdoodata model.
You can specify pre-treatment(s) before any records insertions, you can also,
according to criteria, omit the insertion of an entire record, mofify it or just
create it (CRUD abilities).Some features ofcsv2odooinclude abilities of Pythoncsvmodule to specify
input file configuration. It also include some useful functions to make
specific value operations on each individual columns (Seecallbacksfor more
informations).Quick startSample:#!/usr/bin/env python
#.. your_script.py
from csv2odoo import Model, Field, Odoo, Session

#
# Configure Odoo connection
#

odoo = Odoo(
    host='198.168.0.1', port=8069,
    user='admin', pwd='admin', dbname='database',
    lang'fr_FR')

#
# Create a new importation instance::
#

session = Session(
    'file.csv', delimiter=';', quotechar='"', encoding='utf-8',
    offset=1, limit=10)

#
# Define your mapping to link both csv and Odoo::
#

# res.partner is unique by siren and will not be updated if exists
res_partner = Model('res.partner', fields=[
        Field('name', columns=[1]),
        Field('siren', columns=[2]),
        Field('website', columns=[16]),
    ], update=False, search=['siren'])

# res.country is unique by code and name and will not be updated if exists
res_country = Model('res.country', fields=[
        Field('code', columns=[13], default='FR'),
        Field('name', columns=[13], default='FRANCE'),
    ], update=False, search=['code', 'name'])

# res.partner.address is unique by type and partner_id
res_partner_address = Model('res.partner.address', fields=[

        # Simple fields, some with default value and some unique between records
        Field('zip', columns=[9], default='35000'),
        Field('city', columns=[10], default='RENNES'),
        Field('phone', column=[14]),
        Field('fax', columns=[15]),
        Field('email', columns=[17], unique=True, ignore=True),
        Field('cedex', columns=[68]),

        # Mixing columns (by concatenation or selection)
        Field('street', columns=[7, 6], method='selection'),
        Field('street2', columns=[8, 5], method='concatenate'),

        # Model's relations with res.partner which must exists
        Field('country_id', relation=res_country),
        Field('partner_id', relation=res_partner, required=True),

        # Adding a custom value to a missing field in the `csv` file
        Field('type', custom='delivery'),
    ], search=['type', 'partner_id'])

#
# Finally join objects to the session which starts the import process
#

# There is no particular needs to also inject res.partner model, as it's
# already contained as a relation of res.partner.address
session.bind(odoo, [res_partner_address, ])

#
# Optionaly: show statistics of records's activities during the importation process
#

csv2odoo.show_stats()Supported Python versionscsv2odoosupport Python versions 2.7.LicenseThis software is made available under the LGPLv3 license.Bugs or suggestionsPlease, feel free to report bugs or suggestions in theBug Tracker!
Package: csv2oerp
csv2oerpis a Python converter from thecsvformat toOpenERPdata record.csv2oerpis an easy way to import records from heterogeneous datas by editing
a simple script as the manner ofOpenERPdata model.
You can specify pre-treatment(s) before any records insertions, you can also,
according to criteria, omit the insertion of an entire record, mofify it or just
create it (CRUD abilities).Some features ofcsv2oerpinclude abilities of Pythoncsvmodule to specify
input file configuration. It also include somme abilities of some third party
library according to your needs.Quick start#!/usr/bin/env python#.. your_script.pyfromcsv2oerpimportModel,Field,Openerp,Session## Configure OpenERP connection#oerp=Openerp(host='198.168.0.1',port=8069,user='admin',pwd='admin',dbname='database',lang'fr_FR')## Create a new importation instance::#session=Session('file.csv',delimiter=';',quotechar='"',encoding='utf-8',offset=1,limit=10)## Define your mapping to link both csv and OpenERP::## res.partner is unique by siren and will not be updated if existsres_partner=Model('res.partner',fields=[Field('name',columns=[1]),Field('siren',columns=[2]),Field('website',columns=[16]),],update=False,search=['siren'])# res.country is unique by code and name and will not be updated if existsres_country=Model('res.country',fields=[Field('code',columns=[13],default='FR'),Field('name',columns=[13],default='FRANCE'),],update=False,search=['code','name'])# res.partner.address is unique by type and partner_idres_partner_address=Model('res.partner.address',fields=[# Simple fields, some with default value and some unique between recordsField('zip',columns=[9],default='35000'),Field('city',columns=[10],default='RENNES'),Field('phone',column=[14]),Field('fax',columns=[15]),Field('email',columns=[17],unique=True),Field('cedex',columns=[68]),# Mixing columns (by concatenation or selection)Field('street',columns=[7,6],method='selection'),Field('street2',columns=[8,5],method='concatenate'),# Model's relations with res.partner which must existsField('country_id',relation=res_country),Field('partner_id',relation=res_partner,required=True),# Adding a custom value to a missing field in the `csv` fileField('type',custom='delivery'),],search=['type','partner_id'])## Finally join objects to the session which starts the import process## There is no particular needs to also inject res.partner model, as it's# already contained as a relation of res.partner.addresssession.bind(oerp,[res_partner_address,])## Optionaly: show statistics of records's activities during the importation process#csv2oerp.show_stats()Supported Desktop versionsAll architectures.Supported Python versionscsv2oerpsupport Python versions 2.6 and 2.7.LicenseThis software is made available under the LGPLv3 license.Bugs or suggestionsPlease, feel free to report bugs or suggestions in theBug Tracker!
Package: csv2opd
CSV2OPD - A CSV to XML converter for OpenProdocThis desktop application transforms the metadata stored in a CSV file into XML files compatible with the open source DMSOpenProdoc.This application was created byGuillermo Castellano, fromNosturi.The code is licensed under theGNU General Public License v3.0. Feel free to adapt the application for your specific needs!RequirementsThis application can be used on any operating system which supports Python 3.x.Check if you have Python 3.x installed by entering the following command into your terminal:python --versionYou should see something like this:$ python --version
Python 3.7.0Otherwise,download and install Pythonbefore moving forward.InstallationThe easiest way to download and install CSV2OPD is usingpip:pip install csv2opdAlternatively, you can clone this repository:git clone https://github.com/guillearch/csv2opd.gitThen go to the new directory and run:# If Python 3 is the default version
python setup.py install

# If Python 2 is the default version
python3 setup.py installRunning the applicationRun the application by entering the following command:csv2opd.Select the input CSV file. It must have a header.Select the output directory for the XML files.Select the type of field separator (delimiter) used by your CSV file.Click the button Convert.Once the conversion is completed, you can import the documents and the metadata into OpenProdoc following the instructions provided in theofficial documentation.We're all set!Important: The name of each document must be the same than the value of the Name field on its related OPD file.Additional informationThis application is intended for OpenProdoc 2.x.Please read thechangelogand thehelp file.If you need any further assistance, don't hesitate tocontact me.
Package: csv2parquet
csv2parquetConvert a CSV to a parquet file. You may also findsqlite-parquet-vtableorparquet-metadatauseful.InstallingIf you just want to use the tool:sudo pip install pyarrow csv2parquetIf you want to clone the repo and work on the tool, install its dependencies via pipenv:pipenv installUsageNext, create some Parquet files. The tool supports CSV and TSV files.usage: csv2parquet [-h] [-n ROWS] [-r ROW_GROUP_SIZE] [-o OUTPUT] [-c CODEC]
                   [-i INCLUDE [INCLUDE ...] | -x EXCLUDE [EXCLUDE ...]]
                   [-R RENAME [RENAME ...]] [-t TYPE [TYPE ...]]
                   csv_file

positional arguments:
  csv_file              input file, can be CSV or TSV

optional arguments:
  -h, --help            show this help message and exit
  -n ROWS, --rows ROWS  The number of rows to include, useful for testing.
  -r ROW_GROUP_SIZE, --row-group-size ROW_GROUP_SIZE
                        The number of rows per row group.
  -o OUTPUT, --output OUTPUT
                        The parquet file
  -c CODEC, --codec CODEC
                        The compression codec to use (brotli, gzip, snappy,
                        zstd, none)
  -i INCLUDE [INCLUDE ...], --include INCLUDE [INCLUDE ...]
                        Include the given columns (by index or name)
  -x EXCLUDE [EXCLUDE ...], --exclude EXCLUDE [EXCLUDE ...]
                        Exclude the given columns (by index or name)
  -R RENAME [RENAME ...], --rename RENAME [RENAME ...]
                        Rename a column. Specify the column to be renamed and
                        its new name, eg: 0=age or person_age=age
  -t TYPE [TYPE ...], --type TYPE [TYPE ...]
                        Parse a column as a given type. Specify the column and
                        its type, eg: 0=bool? or person_age=int8. Parse errors
                        are fatal unless the type is followed by a question
                        mark. Valid types are string (default), base64, bool,
                        float32, float64, int8, int16, int32, int64, timestampTestingpylint csv2parquet
pytest
Package: csv2pdf
CSV TO PDF CONVERTER ( .csv ➜ .pdf )A Python module that allows you to convert CSV FILES to PDF FILES easily!Installationpipinstallcsv2pdfExamples 📋# Quick conversion>>>fromcsv2pdfimportconvert>>>convert("source.csv","destination.pdf")# Change Orientation of the PDF File>>>fromcsv2pdfimportconvert>>>convert("source.csv","destination.pdf",orientation="L")# Specify Delimiter for the CSV File>>>fromcsv2pdfimportconvert>>>convert("source.csv","destination.pdf",delimiter="&")# Change Alignment of the cells>>>fromcsv2pdfimportconvert>>>convert("source.csv","destination.pdf",align="L")>>>fromcsv2pdfimportconvert>>>convert("source.csv","destination.pdf",align="R")# Change Size & Header-Size>>>fromcsv2pdfimportconvert>>>convert("source.csv","destination.pdf",size=5)>>>fromcsv2pdfimportconvert>>>convert("source.csv","destination.pdf",headersize=7)# Using custom fonts>>>fromcsv2pdfimportconvert>>>convert("source.csv","destination.pdf",font=r"Fonts\custom-font.tff",headerfont=r"Fonts\custom-header-font.tff")Use.tfffiles for specifying font files. Fonts can be downloaded fromGoogle Fonts.
Package: csv2postgresql
Descriptioncsv2postgresql imports data from a CSV file into PostgreSQL.It differs from PostgreSQLCOPY FROM ... WITH (FORMAT CSV ...)command as it
detects automatically the CSV columns available, so even CSV files with missing
columns or having columns arranged in a different order can be easily imported.SetupThe software can be installed usingpiporpipx, which is preferred.pipx install csv2postgresqlHelp$ csv2postgresql --help
usage: csv2postgresql [-h] [--input-file INPUT_FILE] [--delimiter DELIMITER] [--quotechar QUOTECHAR]
                      [--escapechar ESCAPECHAR] [--encoding ENCODING]
                      dsn table

Load CSV with header into PostgreSQL

positional arguments:
  dsn
  table

optional arguments:
  -h, --help            show this help message and exit
  --input-file INPUT_FILE, -i INPUT_FILE
                        Input file name containing a valid CSV.
  --delimiter DELIMITER, -d DELIMITER
  --quotechar QUOTECHAR
  --escapechar ESCAPECHAR
  --encoding ENCODING, -e ENCODINGExamplecsv2postgresql -i table.csv postgresql://user:password@localhost/db table
Package: csv2qif
csv2qifUsageCSV to QIF

usage: csv2qif -a ACCOUNT -t ACCOUNT_TYPE 
               [-i INPUT_FILE] [-o OUTPUT_DIR] [-f OUTPUT_FORMAT] [-c COL_SPEC] 
               [-b] [-s]
               [--help] [--verbose] [--version]

Convert financial transactions in CSV format to QIF files.

options:
  -a ACCOUNT, --account ACCOUNT
                        The full hierarchical name of the account in GnuCash.
                        (default: None)
  -t ACCOUNT_TYPE, --account-type ACCOUNT_TYPE
                        One of "Bank", "Cash", "CCard", or "Invst"
                        (default: None)
  -i INPUT_FILE, --input-file INPUT_FILE
                        Input file in CSV format; define location of required fields using "col-spec"
                        (default: stdin)
  -o OUTPUT_DIR, --output-dir OUTPUT_DIR
                        Directory to write output
                        (default: stdout)
  -f OUTPUT_FORMAT, --output-format OUTPUT_FORMAT
                        Format of output, either "qif" or "json"
                        (default: qif)
  -c COL_SPEC, --col-spec COL_SPEC
                        Specify column of required fields (date, name, amount, check_number)
                        (default: {"date": 1, "name": 2, "amount": 3, "check_number": 6})
  -b, --backup-input    Save a copy of input CSV alongside the QIF file, with same filename.
                        (default: False)
  -s, --strip-headers   Assume first row of input has headers, and remove it. 
                        (default: True)
  --verbose             Debug-level logging
  -v, --version         Show program's version number and exit
  -h, --help            Show this help message and exit

MIT License: ©2023 Edward Q. BridgesDevelopmentIt is recommended to usepyenvto ensure correct python version is in use.  Cf.:.python-versionSet up virtualenv:python -m venv venvActivate virtualenv:source ./venv/bin/activateUpdate pip:pip install --upgrade pipRelease processFormat code using:black .Commit/push all final code.Increment version incsv2qif/__init__.pyand commit/push.Tag release in formatx.y.z, using same version string as incsv2qif/__init__.py. Push tag to remote.Publish a new release version; doing so will trigger an upload to PyPI.LicenseMIT
Package: csv2shap
输入csv文件的路径于引号中，可command+空格键打开聚焦搜索，输入terminal打开终端，将需输入的csv文件拖入终端，即可显示文件路径file_path = ''在中括号中输入想要删除的特征名，如用户ID，与label强相关的同类特征，需加双引号，特征名之间加逗号（均为英文输入法下的符号）如"user_id","days_active_in_l7d"del_cols = []输入需要预测的变量名于引号中，即label名，需要为二分类变量，即取值为0或1label_feature = ''输入变量中英文对应的csv文件路径于引号中，csv文件格式：第一行为name_en,name_cn其余各行格式为 特征英文名,特征中文名 ；目的是输出的特征重要性图中特征名为中文，如不需要可在文件中只写入第一行，即name_en,name_cnfeature_name_file_path = ''可以不修改，表示html文件输出路径root = '/Users/user/Desktop/'可以不修改，表示输出html文件名jpg_name = 'shap_value'无需修改main(file_path, del_cols, label_feature, feature_name_file_path, root, jpg_name)
Package: csv2sqltable
‘’’import csv2sqltable.convert as c2sprint(c2s.transform(‘customer.csv’))Output:%%sql
– DROP TABLE customer;CREATE TABLE customer (
customer_id VARCHAR(100),
customername VARCHAR(100),
lastname VARCHAR(100),
country VARCHAR(100),
age VARCHAR(100),
phone VARCHAR(100)
);INSERT INTO customer (customer_id, customername, lastname, country, age, phone)
VALUES
(‘1’, ‘Shubham’, ‘Thakur’, ‘India’, ‘23’, ‘xxxxxxxxxx’),
(‘2’, ‘Aman’, ‘Chopra’, ‘Australia’, ‘21’, ‘xxxxxxxxxx’),
(‘3’, ‘Naveen’, ‘Tulasi’, ‘Sri Lanka’, ‘24’, ‘xxxxxxxxxx’),
(‘4’, ‘Aditya’, ‘Arpan’, ‘Austria’, ‘21’, ‘xxxxxxxxxx’),
(‘5’, ‘Nishant. Salchichas S.A.’, ‘Jain’, ‘Spain’, ‘22’, ‘xxxxxxxxxx’);SELECT * FROM customer;‘’’
Package: csv2tsv
csv-to-tsvConvert CSV file to tab-delimited TSV file.Installation and Usagepython is installed, install with pippipinstallcsv2tsvfromcsv2tsvimportto_csvto_csv(src_dir)or copy csv2tsv folder and runpy-mcsv2tsv[src_dir]python is NOT installed, download from release and run batch file.APIUse pythonto_csv(src, [dist_dir], [encoding="utf-8"], [delimiter=","])src: Source csv directory or csv file path.dist_dir: Output directory. If None, a folder named tsv will be created in the same hierarchy as the src folder. (default=None)encoding: Character encoding of src/dist csv. (default="utf-8")delimiter: Delimiter of src csv. (default=",")Use commandSee help.py-mcsv2tsv--helpLicenseMIT License
Package: csv2txt
CSV to TXTA python util package for convert a csv file to token separator txt file.HomePage:https://pypi.org/project/csv2txt/SourceCode:https://github.com/gyk001/csv2txtUsageIn command lineJust install the package by pip, then enjoy it!pipinstallcsv2txt
csv2txtinput.csvout.txtIn source codeimportcsv2txt# for File Pathcsv2txt.convertByPath(csvFilePathString,txtFilePathString,'\t');# for File Objectcsv2txt.convertByFile(csvFile,txtFile,'\t');
Package: csv2vcard
[![Downloads](http://pepy.tech/badge/csv2vcard)](http://pepy.tech/count/csv2vcard)csv2vcardA Python script that parses a .csv file of contacts and automatically creates vCards. The vCards are super useful for sending your contact details or those of your team. You can also upload them to e.g. Dropbox and use them with QR codes! You can also use them for transferring new contacts to Outlook, a new CRM etc. The specific use case in mind was to programmatically create vCards from a list of contacts in a spreadsheet, to be incorporated into business cards.UsageInstall package withpip3 install csv2vcardCreate csv file with contactsCSV file format (delimeter can be changed in csv_delimeter param, see below)last_name, first_name, org, title, phone, email, website, street, city, p_code, countryImportant: you should name the columns exactly the same way because they are used as keys to generate the vCardscd yourcsvfoldernamego to the folder where you have your csv fileOpen pythonpython3(gotcha: using Python 3.6 features)Import modulefrom csv2vcard import csv2vcardNow you have 2 options for running (both will create an /export/ dir for your vCard):Test the app withcsv2vcard.test_csv2vcard(). This will create a Forrest Gump test vCard.Use your real datacsv2vcard.csv2vcard(“yourcsvfilename”, “,”)where “,”  is your csv delimeter. This will create all your vCards.
Package: csv2xls
Put together some CSV files into a single Excel file, in different sheets.InstallationYou can install directly after cloning:$pythonsetup.pyinstall--userOr use the Python package:$pipinstall--usercsv2xlsDependencyOutside the standard library, thexlwtpackage is needed, and should be
automatically installed with setuptools. Otherwise:$pipinstall--userxlwtExample$csv2xlsexamples/sheet_alpha.csvexamples/sheet_beta.csv-ooutput.xlsProcessingexamples/sheet_alpha.csv->output.xls/alphaProcessingexamples/sheet_beta.csv->output.xls/betaUsage$csv2xls-husage:csv2xls[-h][-oOUTPUT][-c][-dDELIMITER][-qQUOTECHAR][-n][-DFORMAT][-k]files[files...]PuttogethersomeCSVfilesintoasingleExcelfile.Basictypesareinferredautomatically.positionalarguments:filesoptionalarguments:-h,--helpshowthishelpmessageandexit-oOUTPUT,--outputOUTPUTDefinenameforoutputExcelfile.Defaultis"output.xls".-c,--cleanDeleteinputfilesafterwards,ifsuccessful.-dDELIMITER,--delimiterDELIMITERChangerowdelimiter.Defaultis",".-qQUOTECHAR,--quotecharQUOTECHARChangequotingcharacter.Defaultwayofquotingis"that is, quoted".-n,--no-type-inferenceDonottrytoinferint/float/datewhenwriting.Thismodeisfasterandpreservesinputdata.-DFORMAT,--date-formatFORMATChangedateformatusedduringdatetypeinference.Defaultis"%Y-%m-%d".-k,--keep-prefixKeepcommonprefixwhenbuildingsheetnames.Defaultistoremovethecommonprefixofinputfilenames.Example:csv2xlsexamples/sheet_alpha.csvexamples/sheet_beta.csvTestsTo run the tests, you must installxls2txt:$gitclonehttps://github.com/hroptatyr/xls2txt.git$cdxls2txt$make$sudomakeinstallThen run:$./tests.sh
Package: csvalidate
csvalidate is a minimal library for reading from and writing to csv with an
added layer of validationStatusEven though csvalidate doesn’t get much work, it is maintained. Don’t hesitate
to open issues or pull requests.Get StartedInstallationAs any python package, you can install it via pip:$ pip install csvalidateHow ot use it ?The gist of it is to subclass one ofValidatedReaderorValidatedWriterand
add aschemaclass attribute that defines validation.Examples can be found in theexamplesdirectory.
Package: csvbar
CSV Bar=======Draw bar charts from CSV files in the terminal.Requires either version 2 or 3 of [Python] (https://www.python.org/), including `pip`.Installing----------Install with Pip: `pip install csvbar`.Usage-----Say you have a CSV file such as:```Donor,ValueTrust,93167.74Limited Liability Partnership,100522.93Friendly Society,111428.84Registered Political Party,382227.01Unincorporated Association,2846016.31Company,3696180.22Individual,11021726.04Trade Union,44483505.54```You can then:```bash$ csvbar data.csvTrust                          ▌ 93,167.74 (0.15%)Limited Liability Partnership  ▌ 100,522.93 (0.16%)Friendly Society               ▌ 111,428.84 (0.18%)Registered Political Party     ▌ 382,227.01 (0.61%)Unincorporated Association     ███ 2,846,016.31 (4.54%)Company                        ████ 3,696,180.22 (5.89%)Individual                     ████████████ 11,021,726.04 (17.57%)Trade Union                    ██████████████████████████████████████████████████ 44,483,505.54 (70.91%)Total: 62,734,774.63```It also accepts data on STDIN, useful if you're using something like [CSV Kit] (https://github.com/onyxfish/csvkit) or [Q] (https://github.com/harelba/q).Inspiration-----------There are similar tools:* [data_hacks] (https://github.com/bitly/data_hacks), by [Bitly] (https://bitly.com/)* [termgraph] (https://github.com/mkaz/termgraph), by [Marcus Kazmierczak] (https://twitter.com/mkaz)* [spark] (https://github.com/holman/spark), by [Zach Holman] (https://twitter.com/holman)
Package: csvbase-client
csvbase-clientThe command line client forcsvbase.StatusThis tool is very early alpha and suitable for testing.UsageGet a tablecsvbase-clienttablegetmeripaterson/stock-exchangesOutputs CSV to stdout:csvbase_row_id,Continent,Country,Name,MIC,Last changed
1,Africa,Lesotho,HYBSE,,2019-03-25
2,Asia,Kazakhstan,Astana International Financial Centre,AIXK,2018-11-18
3,Africa,South Africa,ZAR X,ZARX,2018-11-18
[ full file omitted ]Set (aka "upsert") a table:csvbase-clienttablesetmeripaterson/stock-exchangesstock-exchanges.csvNothing is output upon success and exit code is 0.InstallingExecutableDownload these from the github release page.Pip + PyPIpipinstallcsvbase-clientDockerdockerpullcalpaterson/csvbase-clientThen when you run:# mount your own xdg-cache directory as a volume inside the containerdockerrun-v"${XDG_CACHE_HOME:-$HOME/.cache}":/root/.cachecalpaterson/csvbase-client