Saravanan666/pypi-org huggingface dataset:
Package: csv-to-sqlite
csv-to-sqliteThis is a simple,datatype-guessingscript that takes CSV files as input and copies their contents into a SQLite database.(Column names are taken from the headers (first row) in the csv file.)Intended forPython 3. (I know itdidrun on Py2 as some people tried, but I haven't tested it.)LinksSource on GitHubPyPI pageIntroductory blog post with basic intro + a how-toOther related blog postsOverviewInstalls viapip install csv-to-sqliteTo find out more, runcsv-to-sqlite --helpIf you've installed the package as a dependency for your own script, you can use it like this:importcsv_to_sqlite# all the usual options are supportedoptions=csv_to_sqlite.CsvOptions(typing_style="full",encoding="windows-1250")input_files=["abilities.csv","moves.csv"]# pass in a list of CSV filescsv_to_sqlite.write_csv(input_files,"output.sqlite",options)
Package: csv_to_table
When importing CSV files to databases, I sometimes find it tedious to create the table in a database first. This is a very basic app (and a work in progress) that grabs the rows of a CSV file (sampling, if specified), uses the sample to guess at the data types of the columns, and uses these guesses to output a SQL `CREATE TABLE` statement. Think of it as a version of `CREATE TABLE some_table AS SELECT * FROM <some CSV file>`.For the moment, this is aimed towards PostgreSQL (although that will change) and for now, a very limited number of data types will be supported, namely `text`, `boolean`, `smallint`, `int`, `bigint`, `numeric`, `date`, and `timestamp` (which are the types that I find myself using the most often).To install, you can use pip:```sudo pip install csv-to-table```or you can grab the code (via either a `git clone` or just downloading a zip file of the repository) and then doing a```python setup.py install```Here's the flowchart of the type guessing (it's also available in the `images` folder of this repo):![flowchart](https://github.com/jackmaney/csv-to-table/blob/master/images/type_guessing_flowchart.png?raw=true)Here's a quick example:Input:```$cat test.csva,b,c,d,e32,"2013-12-28 22:16:57",0,"True","Here's some text, and some more""17.1","2012-06-29 05:11:00", -3,"False","Yep, more text"```Code:```from typeguesser import TypeGuessertg = TypeGuesser("test.csv", header=True)tg.guessTypes()print tg.getCreateStatement()```Output:```$ python test.pyCREATE TABLE test (a numeric,b timestamp,c smallint,d boolean,e text);```Or, equivalently, you can use the included script `csv-to-table.py`:```$ ./csv-to-table.py -husage: csv_to_table.py [-h] [--header] [--lowercase_header] [--sample SAMPLE][--quotechar QUOTECHAR] [--delimiter DELIMITER][--table_name TABLE_NAME] [--columns COLUMNS]filepositional arguments:file                  The name (and path) of the target CSV fileoptional arguments:-h, --help            show this help message and exit--header              Indicate whether or not the file has a header--lowercase_header    Indicate whether or not to lowercase inferred columnnames.--sample SAMPLE       Sampling probability (between 0 and 1). If set, thisgives the sampling probability for rows of the givenCSV file--quotechar QUOTECHARThe quote character to use for the CSV file (default'"')--delimiter DELIMITERThe delimiter to use for the CSV file (default ',')--table_name TABLE_NAMEThe name of the table desired in the output--columns COLUMNS     A comma-delimited list of column names that you wishto use```So, in particular:```$ ./csv-to-table.py --header test.csvCREATE TABLE test (a numeric,b timestamp,c smallint,d boolean,e text);```
Package: csvtotrello
csvtotrello💻 Basic Python script to bulk import CSV backlog into Trello🛠 Installpip install csvtotrello🎉 Get startedGet your trello API key fromhere.Get your board id.csvtotrello <trello_api_key> <trello_api_token> <board_id> <file_path_to_csv>🗂 CSV templateYour csv file should look like belowCategoryTaskCommentLoaduser story1 nametask1 nameany commenttask loaduser story1 nametask2 nameany commenttask loaduser story2 nametask3 nameany commenttask load
Package: csvTovcf
[![Downloads](http://pepy.tech/badge/csvTovcf)](http://pepy.tech/count/csvTovcf)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 csvTovcfCreate 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”, “,”, single_file=True)where “,”  is your csv delimeter. This will create many vCards or single vCard depending on thesingle_file=Trueparamter.
Package: csv-to-xls
csv_to_xlsInstallpipinstallcsv_to_xlsHow to useWhen you installcsv_to_xlsyou will get a cli tool namedcsv2xls:!csv2xls--helpusage: csv2xls [-h] [--file_glob FILE_GLOB] [--out_file OUT_FILE] [--recursive]
               [--delimiter DELIMITER] [--quotechar QUOTECHAR] [--symlinks]
               [--file_re FILE_RE] [--folder_re FOLDER_RE]
               [--skip_file_glob SKIP_FILE_GLOB] [--skip_file_re SKIP_FILE_RE]
               [--skip_folder_re SKIP_FOLDER_RE]
               path

Convert csv file(s) into an excel file, if multiple csvs put on tabs.

positional arguments:
  path                             path to searching for *.csv files

optional arguments:
  -h, --help                       show this help message and exit
  --file_glob FILE_GLOB            Only include files matching glob (default:
                                   *.csv)
  --out_file OUT_FILE              output excel file (default: output.xlsx)
  --recursive                      search subfolders (default: False)
  --delimiter DELIMITER            delimiter to use (default: ,)
  --quotechar QUOTECHAR            quote character to escape the delimiter
                                   (default: ")
  --symlinks                       follow symlinks? (default: False)
  --file_re FILE_RE                Only include files matching regex
  --folder_re FOLDER_RE            Only enter folders matching regex
  --skip_file_glob SKIP_FILE_GLOB  Skip files matching glob
  --skip_file_re SKIP_FILE_RE      Skip files matching regex
  --skip_folder_re SKIP_FOLDER_RE  Skip folders matching regex,ExampleConsider the below csv files:!ls_tests/addresses.csv biostats.csv  faithful.csv  hw_200.csv    tally_cab.csvTo merge these csvs into one excel file namedmerged.xlsx:!csv2xls_tests/--out_filemerged.xlsxWe can see there is a worksheet for each filename:importpandasaspdpd.ExcelFile('merged.xlsx').sheet_names['addresses', 'biostats', 'hw_200', 'tally_cab', 'faithful']Let’s say we want to skip thebiostats.csvfile, we can use the--skip_file_rearg:!rm-fmerged.xlsx!csv2xls_tests/--out_filemerged.xlsx--skip_file_re'biostats*'Now that particular sheet is not there:pd.ExcelFile('merged.xlsx').sheet_names['addresses', 'hw_200', 'tally_cab', 'faithful']
Package: csv-trans
Universal Translator for csv filesThis package is used to translate csv files across different languages. It uses the Google Translate API to translate the csv files from a source language to a target language. Supported languages are listedhere. The package can handle csv files with multiple columns and rows and can translate the whole file in one go, saving your time and effort.Installationpipinstallcsv-transYou can use the package in two ways:Using the command line interface (CLI)Using the import utility in your python code.Both the CLI and the import utility take the same arguments. The only difference is that the CLI takes the arguments as command line arguments while the import utility takes the arguments as function arguments. The arguments are listed below.--fileor-f: The path to the source csv file.--source_languageor-sl: The source language of the csv file.--target_languageor-tl: The target language of the csv file.--sepor-s: The separator used in the csv file.Using the import utilityfromcsv_transimporttranslate
translate(file,source_language,target_language,sep=',')Using the CLI utilityOpen the CLI and install the packageUse the below commandcsv_trans-f<file_name>-sl<source_language>-tl<target_language>-fs<file_seperator>For Further information, checkout ourGitHub Page.Contributors ✨Saeed Ahmad💻📖Izhar Ali💻📖Shaharyar Sajid💻
Package: csv-transcriber
CSV-TranscriberBreaks down a CSV file into text files containing the contents of each row.InstallationYou can use PIP to install the package. Type the following command into your terminal to install the package.pipinstallcsv_transcriberUsageThe package contains a transcribe function, which takes in the path to a CSV file, and an output to a directory. A typical use of the function is as follows:importcsv_transcriber

csv_transcriber.transcribe('./data.csv','./users/')LicenseA short snippet describing the license (MIT, Apache etc)MIT Â© Jad Khalili 2019.
Package: csv-trimming
Package python to remove common ugliness from a csv-like file.Sometimes when working with CSVs that are exported from excel
or generally from software that do not primarily focus
on exporting well formatted CSVs, CSV files are exported
with empty columns or padding around.This package is to fix that kind of issues.How do I install this package?As usual, just download it using pip:pipinstallcsv_trimmingTests CoverageSince some software handling coverages sometime
get slightly different results, here’s three of them:Package python to remove common ugliness from a csv-like file
Package: csvtsdb
CSV-backed timeseries database. Usable standalone or in a Twisted
application.Not your typical timeseries database:Fastx:Good compressionx:Stupid simpleheavy_check_mark:Implies you probably don’t want to use it unless you know you do. A good
use case is forsmall amounts of datathat should beeasily editable
and/or readable in 30 yearswhen your favorite real TSDB software is
long dead.I will use it in my personal tracking project (TBA), which expects about
1 datapoint per series per day (and a small number of series), because
most datapoints are input by the user.Note: if you want to use this, but you are not happy with the
request format (e.g. you want JSON),let me
know– that is
a very easy change.This is a WIP and it will have more features in the future.
Package: csv-utilities
CSV UtilitiesEveryone needs some really basic CSV utilities in Python.Every once in a while I find I need to write a script in Python to parse a CSV.
This could be for taxes, ingesting raw data into a database, or fixing messed-up data.I needed a way to manipulate CSVs in Python, so I made this library after reinventing the wheel several times. It makes editing and processing CSV data a lot simpler.Installationpipinstallcsv-utilitesBasic Usagefromcsv_utilitiesimportopen_csvCSV_PATH='~/Documents/transactions.csv'transactions=open_csv(CSV_PATH)# Reads the file and creates a CSV object.transactions.echo()# Prints the CSV to STDOUT
Package: csvutils
The standard csv module is very useful for parsing tabular data in CSV format.
Typically though, one or more transformations need to be applied to the generated
rows before being ready to be used; for instance “convert the 3rd column to int,
the 5th to float and ignore all the rest”. This module provides an easy way to
specify such transformations upfront instead of coding them every time by hand.Two classes are currently available, SequenceTransformer and MappingTransformer,
that represent each row as a list (like csv.reader) or dict (like csv.DictReader),
respectively.
Package: csvviz
csvvizCreate visualizations from CSV files and the command lineCurrent statusPretty usable:$ csvviz bar -x name -y amount examples/tings.csv

$ csvviz line -x date -y price -c company examples/stocks.csvBut undocumented so far, other than running$ csvviz--helpFeaturesCan do the standard chart typesProduces validated Vega-lite JSON output that can be reusedFree software: MIT licenseCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.Dev instructionsTo install on your own machine for development:$ make installNote: setup.py/requirements.txt is not correctly set up yet…(note to self) To publish on pypi:$ make releaseHistory0.4.0-alpha (ongoing)Can specify var titles with pipe-delimited syntax, e.g.-x'fieldname|The field name'0.3.1 (2020-09-30)Removed (non-existent) Python 3.5 compat, fixed 3.6 & 3.7 compatNormalized area and bar charts with-N/--normalizeremoved ‘-alpha’ tag0.3.0-alpha (2020-09-28)New chart typesareahist (like bar charts, but for frequency count only)linescatter, which can act as bubble chart if--sizevarparam is setGrid (i.e. trellis/small multiples)For any chart type, use-g/--gridto specify variable to map chart multiples0.2.1-alpha (2020-09-23)GeneralFixed total breakage0.2.0-alpha (2020-09-23)Generalcsvviz--versionprints out versionviz options–theme to set chart theme–json to output Vegalite chart specification in JSON–no-preview to not preview chart in browser (useful for testing)–interactive/–static to show an interactive chart or not (default is ‘static’)cli.infoa command for general help and listingShow list of colors, colorschemes, themes, etccli.bararguments and optionsx,y options accept integers (as strings)–fill/-s-H/–horizontal for horizontal bars (vertical columns is default)–colors/-c to set colors–color-scheme/-C to specify a color scheme0.1.1-alpha (2020-09-15 16:30)cli.barMinimally functional:$ csvviz bars-xname-ythings examples/tings.csv0.1.0-alpha (2020-09-15)First release on PyPI. Just a cookiecutter-pypackage skeleton stub.
Package: csvwlib
Aboutcsvwlibis a Python implementation of the W3CCSV on the Webrecommendations.This enables converting tabular data, and optionally its associated
metadata, to a semantic graph in RDF or JSON-LD format.Tabular data includes CSV files, TSV files, and upstream may be
coming from spreadsheets, RDBMS export, etc.Requires Python 3.6 or later.Installationpip install csvwlibUsageThe library exposes one class -CSVWConverterwhich has methodsto_json()andto_rdf()Both of these methods have similar API, and require 3+ parameters:csv_url- URL of a CSV file; defaultNonemetadata_url- optional URL of a metadata file; defaultNonemode- conversion mode; defaultstandard, orminimalThe are three ways of starting the conversion process:pass onlycsv_url- corresponding metadata will be looked up based oncsv_urlas described inLocating Metadatapass bothcsv_urlandmetadata_url- metadata by user will be used. Ifurlfield is set in metadata, the CSV file will be retrieved from that location which can cause, that passedcsv_urlwill be ignoredpass onlymetadata_url- associated CSV files will be retrieved based on metadataurlfieldYou can also specify the conversion mode -standardorminimal, the default isstandard.
From theW3C documentation:Standardmode conversion frames the information gleaned from the cells of the tabular data with details of the rows, tables, and a group of tables within which that information is provided.Minimalmode conversion includes only the information gleaned from the cells of the tabular data.After conversion to JSON, you receive adictobject, when converting to RDF it is more complex.
If you passformatparameter, graph will be serialized to this format and returned as string.
From therdflibdocs:Format support can be extended with plugins, but "xml", "n3", "turtle", "nt", "pretty-xml", "trix", "trig" and "nquads" are built in.If you don't specify the format, you will receive ardflib.Graphobject.ExamplesExample data+metadata files can be found athttp://w3c.github.io/csvw/tests/Starting with CSV:fromcsvwlibimportCSVWConverterCSVWConverter.to_rdf("http://w3c.github.io/csvw/tests/test001.csv",format="ttl")Minimal mode:fromcsvwlibimportCSVWConverterCSVWConverter.to_rdf("http://w3c.github.io/csvw/tests/tree-ops.csv",mode="minimal",format="ttl")Starting with metadata only:fromcsvwlibimportCSVWConverterCSVWConverter.to_rdf(metadata_url="http://w3c.github.io/csvw/tests/test188-metadata.json",format="ttl")Both CSV and metadata URL specified:fromcsvwlibimportCSVWConverterCSVWConverter.to_rdf("http://w3c.github.io/csvw/tests/tree-ops.csv","http://w3c.github.io/csvw/tests/tree-ops.csv",format="ttl")Starting with metadata:fromcsvwlibimportCSVWConverterCSVWConverter.to_json("http://w3c.github.io/csvw/tests/countries.json")Starting with CSV:fromcsvwlibimportCSVWConverterCSVWConverter.to_json("http://w3c.github.io/csvw/tests/test001.csv")ContributorsAuthored by@Aleksander-DrozdMaintained by@DerwenAI
Package: csvx
A csv library that supports 2 and 3, does the unicode thing properly, and lets you read rows as ordered dictionaries so that the ordering stays correct by default.Which makes things pretty easy.Example. You’ve got a csv you want to sanitize by removing a column of passwords.Here’s how that looks.importcsvxwithcsvx.OrderedDictReader('unsanitized.csv')ascsv_in:rows=list(csv_in)forrinrows:delr['password']withcsvx.DictWriter('sanitized.csv')ascsv_out:csv_out.write_dicts(rows)DocumentationFull documentation is athttps://csvx.readthedocs.org.InstallSimply install withpip:$ pip install csvx
Package: csvxls
Two functions to aid in reading CSV and XLS/XLSX files interchangeably,
while respecting Unicode.read_csv_or_xls does its best to read its data argument (should be
bytes) as an Excel file.  If it fails, it tries to decode it as UTF-8.
If you hand it a (Unicode) string, it’ll just return it.utf8_reader gives you a CSV reader (like the csv library’s) which
decodes its argument as UTF-8; the generator yields Unicode strings.
Package: csvy
csvyBasic context wrappers for stardard library csv.read and csv.write methods.Writer ExampleBThe writer returns a straight up csv.writer object:import csvy

with csvy.writer('csvpath.csv') as csvfile:
    csvfile.writerow([1, 2, 3, 4])Reader ExampleThe reader returns a proxy object that behaves a bit differently. You must
call theitermethod that yield an enumerator:import csvy

with csvy.reader('csvpath.csv') as csvfile:
    for index, row in csvfile.iter():
        print(f"{index}: {row}")If a header row is detected, the row object will be anamedtuplebased
on the values of the header line:"""
src.csv:

A,B,C,column D
1,2,3,4
5,6,7,8

"""
import csvy

with csvy.reader('src.csv') as csvfile:
    for index, row in csvfile.iter():
        print(row.a)
        print(row.column_d)
Package: csv-zip-rsync
compress csv to zip and rsync to remote serverUsageCompress csv files in a directory to zip file. And upload to remote ssh server.Including checking zip completion and remove csv and zip files after they are uploaded.csv_zip_rsync "{directory to backup}" "ssh name" "remote directory to upload" "not modified period in sec" "suffix to zip and upload"Installationpip install csv_zip_rsyncUsed compression methodOriginal File :5902183
ZIP_STORED :zip_stats.st_size=5902297 rate:100.00% time:0.02641892433166504
ZIP_DEFLATED :zip_stats.st_size=1280575 rate:21.70% time:1.8873212337493896
ZIP_BZIP2 :zip_stats.st_size=1093927 rate:18.53% time:0.8491525650024414
ZIP_LZMA :zip_stats.st_size=972919 rate:16.48% time:5.862420558929443LZMAshowed most efficient compression rate.LIP_BZIP2was fast enough. so I chose BZIP2.RequirementsCompatibilityLicenceAuthorspackage_name was written byfx-kirin.
Package: csw
文自在変換ツール(Convert Sentences at Will)これは平叙文肯定や平叙文否定、疑問文、命令文など、様々な文型からなる日本語の文章を互いに変換することができるツールです。文章の形態素解析を行い、変換をルールベースによって実現しています。コマンド終了後、ImportError: cannot import name 'main' from 'csw.csw' のようなエラーが出力されますが、動作には問題ありません。Google Colaboratoryでの実行も可能です。環境Linux OS もしくは Google ColaboratoryPython 3系MeCabipadic-utf8(/var/lib/mecab/dic/ にインストールされていること)使い方n：平叙文肯定, d：平叙文否定, q：疑問文, o：命令文--n2d：平叙文肯定から平叙文否定への変換--n2q：平叙文肯定から疑問文への変換--n2o：平叙文肯定か命令文への変換--d2n：平叙文否定から平叙文肯定への変換--d2q：平叙文否定から疑問文への変換--d2o：平叙文否定から命令文への変換--q2n：疑問文から平叙文肯定への変換--q2d：疑問文から平叙文否定への変換--q2o：疑問文から命令文への変換--o2n：命令文から平叙文肯定への変換--o2d：命令文から平叙文否定への変換--o2q：命令文から疑問文への変換--n：平叙文肯定への変換--d：平叙文否定への変換--q：疑問文への変換--o：命令文への変換-c, --current：一文ずつ入出力-d, --detail：形態素解析結果を表示-f, --file：ファイルによる入出力(その後ろに変換元ファイル名、変換先ファイル名を順に指定)使用例csw --n2d --current --detail もしくは csw --n2d -cd平叙文肯定から平叙文否定への変換を一文ずつの入出力で行います。csw --q --file hoge.txt piyo.txt もしくは csw --q -f hoge.txt piyo.txt様々な文型の文章で構成されたhoge.txtを全て疑問文に変換し、それらをpiyo.txtへ上書きします。実行例$ csw --n2d -cd
「e」か「え」を入力で終了

---------------------------------------------
input  : 私は人間です。
私	名詞,代名詞,一般,*,*,*,私,ワタシ,ワタシ
は	助詞,係助詞,*,*,*,*,は,ハ,ワ
人間	名詞,一般,*,*,*,*,人間,ニンゲン,ニンゲン
です	助動詞,*,*,*,特殊・デス,基本形,です,デス,デス
。	記号,句点,*,*,*,*,。,。,。
EOS

output : 私は人間じゃないです。
---------------------------------------------
input  : e$ csw --d -f input.txt output.txt
$
Package: csw93
csw93 - Chen, Sun and Wu (1993)CSW93 is a Python package that makes availalble the design matrices of all regular fractional factorial two-level designs from the 1993 paper of Chen, Sun and Wu:"A catalogue of two-level and three-level fractional factorial designs with small runs".
For more information about the package and its functions, see thedocumentation.InstallationUse the package managerpipto install csw93.pipinstallcsw93UsageThe pakage provides three functions to getThe design matrix,The word length pattern,The number of clear two-factor interactions,using only the number of runs and the index of the design.
This index corresponds to the first column in all tables of all tables from the paper.importcsw93# Design matrix of the 16-run design with index 8-4.1csw93.get_design(16,"8-4.1")# Word length pattern of the 32-run design with index 15-10.2csw93.get_wlp(32,"8-4.1")# Number of clear two-factor interactions for the 64-run design 11-5.10csw93.get_cfi(64,"11-5.10")ContributingCode styleTry to follow thePEP 8style guide.
A useful tool for automated formatting isblack.Submitting codeIf you would like to contribute, please submit a pull request.
See theGithub Hello Worldexample, if you are new to Github.
For major changes, please open an issue first to discuss what you would like to change.
By contributing to the repository you state you own the copyright to those contributions and agree to include your contributions as part of this project under the MIT license.TestingIf you contribute, please make sure to update the tests aproprietly.
Continuous integration is performed onTravis-CI.
To perform tests runpytest.
To obtain acoveragereport in html, runcoveragerun-mpytest.
coveragehtmlContactFor further information please contact Alexandre Bohyn, alexandre.bohyn at kuleuven.beLicenseMITRoadmapList of the changes that will be implemented later on:Write detailled documentation for readthedocsChangelog0.6 : Addition ofword2numandnum2wordfunctions0.5 : Remove unused function from docs0.4: fix wrong column numbers and added Xu 2009 to the database (not available as
function yet)0.3: Integration to readthedocs.io0.2: Correct WLP0.1: initial version
Package: csx
csx - Create, manipulate and convert CSX stylesheets.CSX is a style language based onCSS 2.1, with two improvements:Rules may be nested inside other rules.There are no at-rules (like @media or @import).CSX is also somewhat stricter than CSS (for example, you can’t split a
quoted string over more than one line, and comments must be terminated).See the fileREADME.txtprovided with this module for a complete description
of the differences between CSS and CSX.