Saravanan666/pypi-org huggingface dataset:
Package: cs.volto.publiccontracts
cs.volto.publiccontractsPlone product to represent public contracts and publish in a Plone site.This product should be used with [volto-publiccontracts-theme](https://github.com/codesyntax/volto-publiccontacts-theme) as frontendFeaturesCan be bullet pointsExamplesThis add-on can be seen in action at the following sites:
- Is there a page on the internet where everybody can see the features?DocumentationFull documentation for end users can be found in the “docs” folder, and is also available online athttp://docs.plone.org/foo/barTranslationsThis product has been translated intoKlingon (thanks, K’Plai)InstallationInstall cs.volto.publiccontracts by adding it to your buildout:[buildout]

...

eggs =
    cs.volto.publiccontractsand then runningbin/buildoutAuthorsProvided by awesome people ;)ContributorsPut your name here, you deserve it!?ContributeIssue Tracker:https://github.com/collective/cs.volto.publiccontracts/issuesSource Code:https://github.com/collective/cs.volto.publiccontractsDocumentation:https://docs.plone.org/foo/barSupportIf you are having issues, please let us know.
We have a mailing list located at:project@example.comLicenseThe project is licensed under the GPLv2.ContributorsLur Ibargutxi,libargutxi@codesyntax.comChangelog1.0 (2022-06-03)Initial release.
[]
Package: csvorm
csvorm - ORM for CSVThis allows to use the CSV as ORM.INSTALLpip install csvormHOW TO USE ITlayout define:from csvorm import (
    Model,
    Column,
    Integer,
    Unicode,
    DateTime,
    )

class TestCSV(Model):
    _encoding_ = 'cp932'
    id_ = Column(Integer)
    name = Column(Unicode)
    modified_at = Column(DateTime())creating csv:test_csv = TestCSV()

record = test_csv.create()
record.id_ = 1
record.name = u'first'
record.modified_at = datetime.datetime.now()

record = test_csv.create()
record.id_ = 2
record.name = u'second'
record.modified_at = datetime.datetime.now()

test_csv.dump('test.csv')parse csv:test_csv = TestCSV()
test_csv.load('test.csv')export data:id_,name,modified_at
1,first,2014-03-26-15-05-50
2,second,2014-03-26-15-05-50Thanks for contributorsTakesxiSximadakitsunde
Package: csv_overview
csv-overview============Get the vital statistics of a CSV file.You can install with:$ pip install csv_overviewFor example (from the NYPL menu's database):$ csv-overview some/path/Dish.csvDish.csv351769 entries(0) id: 351769 unique (100.00%)0 empty (0.00%),351769 numeric (100.00%)e.g. ['254113', '349976', '228305', '315656', '248210'](1) name: 351734 unique (99.99%)0 empty (0.00%),59 numeric (0.02%)e.g. ['Pineapple Wheel', 'Kase, Fruchte, Kaffee', 'Cocoanut Pie per cut', 'Pernod for Absinthe', 'Hot Chicken Sandwich'](2) description: 1 unique (0.00%)351769 empty (100.00%),0 numeric (0.00%)e.g. ['', '', '', '', ''](3) menus_appeared: 481 unique (0.14%)0 empty (0.00%),351769 numeric (100.00%)e.g. ['357', '395', '328', '283', '195'](4) times_appeared: 505 unique (0.14%)0 empty (0.00%),351769 numeric (100.00%)e.g. ['1360', '516', '155', '434', '85'](5) first_appeared: 140 unique (0.04%)0 empty (0.00%),351769 numeric (100.00%)e.g. ['1913', '1943', '1982', '1908', '1865'](6) last_appeared: 140 unique (0.04%)0 empty (0.00%),351769 numeric (100.00%)e.g. ['2004', '1920', '1981', '1904', '1998'](7) lowest_price: 633 unique (0.18%)6211 empty (1.77%),345558 numeric (98.23%)e.g. ['19.25', '135.0', '2.19', '4.51', '12.95'](8) highest_price: 685 unique (0.19%)6211 empty (1.77%),345558 numeric (98.23%)e.g. ['2.3', '850.0', '6.99', '4.0', '1100.0']Numerics:id: 1.000000 - 410825.000000 (avg: 209010.0423857702, non-0 avg: 209010.0423857702, median: 209171.000000, mode: '287144')menus_appeared: 0.000000 - 7195.000000 (avg: 2.9667025803865603, non-0 avg: 2.9704264960378906, median: 1.000000, mode: '1')times_appeared: -1.000000 - 7901.000000 (avg: 3.0338801884191047, non-0 avg: 3.0363488419070053, median: 1.000000, mode: '1')first_appeared: 0.000000 - 2012.000000 (avg: 1744.2648584724634, non-0 avg: 1930.0559754896872, median: 1900.000000, mode: '1900')last_appeared: 0.000000 - 2012.000000 (avg: 1747.0906845117108, non-0 avg: 1933.1827955974545, median: 1900.000000, mode: '1900')lowest_price: 0.000000 - 9500.000000 (avg: 0.9507477181834131, non-0 avg: 2.526713734176425, median: 0.000000, mode: '0.0')highest_price: 0.000000 - 9500.000000 (avg: 1.517539747307291, non-0 avg: 3.915697196875889, median: 0.000000, mode: '0.0')
Package: csvpandas
csvpandas - A wrapper of the Pandas high performance data analysis library to view and manipulate csv filesTable of Contentsauthorsnotesdependenciesinstallationunit testsdocumentationlicenseauthorsChris RosenthalnotesThis is strictly an experimental package and potentially full of bugs.  I am still in the process of planning and
writing up specifications.  The motivation is to take advantage of Python Pandas high performance libraries for
manipulating csv files on a file system.dependenciesPython 2.7.xsetuptoolsPandas 0.16.2installationTo install csvpandas and python dependencies, run setup.py or pip from the
project directory:% cd csvpandas
% python setup.py install
# or
% pip install -U .If you don’t want to install the dependencies (numpy and pandas take a
while to compile), use:% pip install --no-deps -U .Numpy and pandas require many dependencies to compile (and you’ll
likely need to compile them because versions in package managers are
typically out of date). Fortunately, these can pretty easily be
installed on Ubuntu 12.04 by running:% sudo apt-get build-dep python-numpy python-pandasunit testsUnit tests are implemented using theunittestmodule in the Python
standard library. Thetestssubdirectory is itself a Python
package that imports the local version (ie, the version in the project
directory, not the version installed to the system) of the
package. All unit tests can be run like this:% ./testall
...........
----------------------------------------------------------------------
Ran 11 tests in 0.059s

OKA single unit test can be run by referring to a specific module,
class, or method within thetestspackage using dot notation:% ./testone -v tests.test_utilsdocumentationTo build the Sphinx docs:(cd docs && make html)And to publish to GitHub pages:ghp-import -p docs/_build/html(ghp-import and Sphinx are both included in the requirements.txt)licenseCopyright (c) 2015 Chris RosenthalReleased under theGPLv3License
Package: csv-parakeet
CSV-ParakeetA simple command line tool to convert csv files to parquet, and vice versa.InstallationRequirements:Python >=3.8pipinstall--usercsv-parakeetUsageparakeetp2c/path/to/input.parquet/path/to/output.csv
parakeetc2p/path/to/input.csv/path/to/output.parquetNoticed a bug? Raise anissue.
Package: csvparse
CSV ParseCSV Parse is a simple state-machine based approach to parsing CSV files.  Its creation was motivated after dealing with some CSV parsers that could not properly handle strings with null bytes.  It is not very fast, and definitely not very memory efficient, but if you want to explore simple CSV parsing, look no further.  If you have CSV files that are incorrectly formatted, you can pretty easily modify the code to patch them up.UsageCSV parse supports reading from files or a buffer.Reading Filesfromcsv_parseimportreaddata=read("/home/user/foo.txt")Reading a bufferfromcsv_parseimportparsemy_string='foo,bar\nbaz,bat'size=len(my_string)data=parse(my_string,size)CSV Parse also supports escaping, custom delimiters and newlines, and custom quoting.data=read("/home/user/foo.txt",field_separator=',',null_as="",newline="\n",quote='"')Changelog0.0.3Messing with deployments!0.0.2Markdown for the Markdown parsing gods0.0.1Initial Release
Package: csv-pg
csv_pgA Python module to import/export CSV files efficiently to/from a Postgresql database.Key features:Detect CSV file dialect automaticallyCreate target database table automaticallyHandle localized date/time and decimal formatsFilter CSV file rows during importUsage examplesInstallation:pip install csv_pgImport CSV filetests/samples/misc.csvto tablemisc(recreate table if already exists):python -m csv_pg from_csv tests/samples/misc.csv --recreateExport tablemiscto CSV filemisc.local.csv(recreate file if already exists):python -m csv_pg to_csv misc.local.csv misc --recreateContributors guidelinesPrepare environment:# Debian: sudo apt install libpq-dev
python -m venv .venv       # Debian: python3 -m venv .venv
.\.venv\Scripts\activate   # Linux: source .venv/bin/activate
pip install .[dev]Create test database:sudo -u postgres createdb -E UTF8 -l fr_FR.UTF8 -T template0 test_csv_pgRun tests:python -m unittestAlternatives / inspirationsPandas:Have to manually call Postgresql COPY command?Django Postgres CopyDepends on Django, and force import to a Django model (cannot simply load to a temporary table)No filter during import?
Package: csvpivot
Pivot tables for CSV files in the terminal.Tested on Python 3.6 and 2.7.Installingpip install csvpivotUsageSay you have a CSV file such as:name,country,gender,salary
Oliver,UK,M,10000
Jack,UK,M,21000
Emily,UK,F,32000
Harry,UK,M,43000
Adam,France,M,54000
Paul,France,M,65000
Louise,France,F,76000
Alice,France,F,87000
Emma,Germany,F,98000We could then find the average salary in each country:$ csvpivot test.csv –rows country –values ‘mean(salary)’country,mean(salary)
France,70500
Germany,98000
UK,26500It would be useful to find out the maximum and minimum values too though:$ csvpivot test.csv –rows country –values ‘mean(salary)’ ‘min(salary)’ ‘max(salary)’country,mean(salary),min(salary),max(salary)
France,70500,54000,87000
Germany,98000,98000,98000
UK,26500,10000,43000As well asmean,min, andmax, CSV Pivot also supportsmedian,sum,stddev,count,countuniq,concat, andconcatuniq. All require numerical values apart from the last two. If numbers contain commas they are interpreted as thousands separators and removed.Columns are also supported. So we could break down our data by gender:$ csvpivot test.csv –rows country –values ‘mean(salary)’ –columns gendercountry,mean(salary):F,mean(salary):M
France,81500,59500
Germany,98000,
UK,32000,24666.666666666668
Package: csv-plot
CSV Plot: easy and powerful plotting tool for CSV filesWhat is it?CSV Plotis a tool to easily plot any CSV file, of any size, without never getting out of memory errors.
(Only data which is displayed on the screen is loaded into memory.)It works with user friendly YAML configuration files, to let you choose the layout, colors, units, legends...CSV Plotis built on top of the amazingPyQtGraphlibrary, which ensures a nice and smooth experience, as plotting should always be.InstallationA already installed C compiler is needed to installcsv-plot, else the installation
will fail. To know how to install a C compiler on your system, go toInstalling a C
compilersection at the end of this document.$pipinstallcsv-plotOfficial documentationThe official documentation is hosted on Github Pages:https://nalepae.github.io/csv-plotInstalling a C compilerOn Ubuntu$sudoaptupdate&&sudoaptinstallbuild-essentialOn Mac OSInstallhomebrewif not already done$brewinstallgccOn WindowsLet me Google that for you
Package: csvplus
csvplusCreate, Read, Update, Delete, and Move Rows in a CSV Fileinstallpipinstallcsvplususageimportcsvplusfilepath="./folder/cars.csv"# create csv with the given column namescsvplus.create(filepath,["make","model","year"])# append a new row to the end of the csv filecsvplus.add(filepath,{"make":"Kia","model":"Soul","year":2023})# delete all rows matching the where conditionscsvplus.delete(filepath,where={"make":"Tesla"})# find all rows matching the where conditionscsvplus.read("countries.csv",where={"year":1776})[{"name":"United States of Ameriac","abbreviation":"USA","year":1776}]# move rowsmove(filepath,from_row,to_row,debug_level=0,quoting=csv.QUOTE_ALL):csvplus.move("example.csv",0,20)# move the first row to the 20th line
Package: csv-position-reader
csv-position-readerA custom CSV reader implementation with direct file accessThe default builtin Pythoncsvlib uses an8KBread-ahead buffer on the file pointer, makingfp.tell()yield inaccurate results. This library addresses that head on, explicitly passing back the file pointer position with each row, as well as allowing for direct seeking.References:https://docs.python.org/2/library/csv.htmlhttps://stackoverflow.com/questions/14145082/file-tell-inconsistency/14145118#14145118https://stackoverflow.com/questions/12109622/how-to-know-the-byte-position-of-a-row-of-a-csv-file-in-python/12110160#12110160Usage>>>importcsv_position_reader>>>withopen('tests/data/basic.csv','r')asfp:...reader=csv_position_reader.DictReader(fp)...position,row=reader.next()...print"position:%s"%position...print"row:%s"%row...reader.seek(position)...position_new,row_new=reader.next()...assertposition==position_new...assertrow==row_new...position:26row:{'city':'Atlanta','favorite_color':'black','name':'Sam'}Why? / Who Cares?Because after poring through a CSV one time, you can now build a dictionary/cache of where each row lives for futureO(1)access! You're now a stone's throw away from a CSV-driven database!
Package: csvpp
CSV reformatter to align columnsIt scratched my particular itch of a massive amount of test code with snippets
of CSV data that I wanted to re-format in tidy columns (while retaining the
indentation).FeaturesReads a CSV file as input and outputs a pretty-printed version with all
columns aligned (and indentation retained)DocumentationThe full documentation is athttp://csvpp.rtfd.org.History0.2.0 (2015.12-14)First release done via travis-ci0.1.0 (2015-07-08)First release on PyPI.
Package: csv-processor
Python csv processorThecsv-processoris a python package that turns a csv into various formats.It supports the following conversions:CSV - SQLiteCSV - JsonInstallationIf not alreadyinstall pipInstall the package withpiporpip3:pipinstallcsv-processorUsageExample:fromcsvprocessor.csvtodbimportConvertercsvfile="path/to/your/file"converter=Converter(csvfile)converter.output()->"db.db"
Package: csv-progressbar
CSVProgressBarThis package provides a progress bar wrapper for the standard csv libraryUsageTo use csv reader you must specifyProgressBar object, witch must haveupdatemethod:fromcsv_progress_barimportread_with_pbarpbar=MyPbar(...)withopen('my_file.csv')ascsvfile:reader=read_with_pbar(csvfile,pbar)forrowinreader:...When reading a csv file, the reader calls the update method of the progerss bar, where the argument is the number of readed bytes. So set the progressbar total as the file size in bytes.Personally, I like to usetqdm:importosfromcsv_progress_barimportread_with_pbarfromtqdmimporttqdmpath='my_file.csv'total_size=os.path.getsize(path)pbar=tqdm(total=total_size)withopen(path)ascsvfile:reader=read_with_pbar(csvfile,pbar)forrowinreader:...PerformanceUnfortunately, due to frequent iterations and additional function calls, reading is **~ 30% slower**Cooming soonreaders objecs for pupular progressbarsprogressbar forpandasreader!
Package: csvputty
Command-fu with csv filesA set of command line interfaces and python modules for easily
manipulating, transforming and dealing with csv files quickly and
effectively.CLI UsageAll csvputty commands start withcsvputty, optionally any
input/output files you wish to use, and then the command you wish to
perform.If you do not supply i/o files then csvputty will use stdin/stdout
instead.Example:$ csvputty-idata.csv-oout.txtmarkupThis command will take the selected columns of a CSV file, process each
row through a format string, and return the collective output. For
example:$ csvputty-idata.csv-orendered.html markup 0 1 3 template.htmlThis parses each row ofdata.csvusing the content oftemplate.htmlas a format string and saves torendered.html.In the above example,template.htmlcould be the following:<divclass="row"><divclass="col-sm-4">{}</div><divclass="col-sm-4">{}</div><divclass="col-sm-4">{}</div></div>or<divclass="row"><divclass="col-sm-4">{coconuts}</div><divclass="col-sm-4">{cheese}</div><divclass="col-sm-4">{sausages}</div></div>If used with the-h--headerflag the first row of the CSV is used
to key the template.However csvputty really becomes useful in the full context of the
command line. Take the following example:$ cat data1.csv data2.csv | csvputty-orendered.html markup 0 1 template.htmlThis passesdata1.csvanddata2.csvthrough the same template
and renders them together in a single file.csvputty-idata.csv markup 0 1 -This opens stdin allowing you to enter the template via command line and
prints the results to stdout.diffDiff compares the input CSV against another CSV and outputs rows where
selected columns fulfil the match condition.$ cat subtract1.csv subtract2.csv | csvputty-isource.csv-oout.csv diff-sc18 -The above example returns rows fromsource.csvwhere column 18 is
not found on column column 0 anywhere insubtract1.csvorsubtract2.csv.Package UsageImporting csvputty into your project allows you to use some features
unavailable via the command line interface.For example:importcsvputtydefparse_row(row,row_index):foridx,colinenumerate(row):row[idx]=col.strip().replace("&","&amp;")img_url=row[2].lower().replace(" ","_").replace('&amp;','and')insta_url=row[4].replace("@","")return(img_url,row[1],insta_url,row[3],row[6])input=open('data.csv','r')out=open('rendered.html','w')template=open('template.html','r')csvputty.markup.generate(custom_row_parser=parse_row,csv_file=inputtemplate_file=template,out_file=out)The above example allows me to strip whitespace and replace ampersands
with html entities on all columns, and perform further processing on
other columns.
Package: csvql
csvqlcsvql is an easy to use, open source command line tool to
work with CSV filescsvql has no requirements or dependencies other than Python 3FeaturesImport one or more CSV files into an SQLite database as tablesQuery and modify the data using SQLExport CSV files from the results of SQL queriesOptionally export data in JSON formatInstallationYou can install, upgrade, and uninstallcsvql.pywith these commands:$pip3installcsvql$pip3install--upgradecsvql$pip3uninstallcsvqlHelpTo get help use:$csvql-hExamplesSeeexamplesfolder for common and advanced use cases
Package: csvquerytool
This module provides a very simple command-line tool for running arbitrary SQL
queries on CSV files. It’s useful for situations where you need to quickly
explore and manipulate CSV files, where using a full database is often overkill.Say we have the following two files:employees.csv:surname,department_id
Rafferty,31
Jones,33
Steinberg,33
Robinson,34
Smith,34
John,departments.csv:department_id,department_name
31,Sales
33,Engineering
34,Clerical
35,MarketingLet’s load these two CSV files:$ csvquery employees.csv departments.csvAt this point, you will be presented with an interactive SQL console:* file 'employees.csv' loaded into table 'csv'
* file 'departments.csv' loaded into table 'csv2'
SQL Interactive Console
=>You can see that the fileemployees.csvwas loaded into an SQL table namedcsvand the filedepartments.csvinto a table namedcsv2. From here,
you can start running whatever SQL queries you want.Let’s select all of the records from the employees table:=> SELECT * FROM csv
surname,department_id
Rafferty,31
Jones,33
Steinberg,33
Robinson,34
Smith,34
John,NoneAnd now let’s join the employees table to the departments table:=> SELECT csv.surname, csv2.department_name FROM csv NATURAL JOIN csv2
surname,department_name
Rafferty,Sales
Jones,Engineering
Steinberg,Engineering
Robinson,Clerical
Smith,ClericalPress ^D to exit the SQL console when you are done.You can also specify an SQL query as an argument tocsvquery(which is more
useful for scripts, where you can’t use the interactive console):$ csvquery -q "SELECT csv.surname, csv2.department_name FROM csv NATURAL JOIN csv2" departments.csvThe output of this command is CSV formatted, so it can be redirected to an
output CSV file if required:$ csvquery -q "SELECT csv.surname, csv2.department_name FROM csv NATURAL JOIN csv2" departments.csv > employee_departments.csvWarning:All of the input CSV files are loaded into memory to perform the
queries. This means that this module is not appropriate for processing very
large CSV files.
Package: csv-reader
IntroductionWelcome to my small python project.
This library just provides some functions to read from csv files.
I developed this library for fun.
If anyone wants to contribute, feel free to contact me or open an issue.
This library uses the built-incsvmoduleInstallationType this into your command prompt:pip install csv-readerUsageat the top of your py files:fromreaderimportReaderin your code:withReader.openWithName("test.csv")asfile:forlineinfile:print(line)DocumentationopenWithName(name:str)opens a file with the given file name and returns a context manager.name - the name of the csv file.throws: FileNotFoundError - when the file could not be found.e.g.withReader.openWithName("test.csv")asfile:forlineinfile:print(line)note: when used in a `for` loop, each `line` is a list of values in each line of the file.openWithFile(file:TextIO)returns a context manager from an already opened file.file - the file object.throws: FileNotFoundError - when the file could not be found.e.g.withReader.openWithFile(open("test.csv"newline=""))asfile:forlineinfile:print(line)note: when used in a `for` loop, each `line` is a list of values in each line of the file.readFromName(name:str)opens a file with given name and returns a context manager that yields an iterator that yields each line in the file.name - the name of the csv file.throws: FileNotFoundError - when the file could not be found.e.g.withReader.readFromName("test.csv")asfile:forlineinfile:print(line)note: `line` is a string.readFromFile(file:TextIO)returns an context manager from an already opened file that yields an iterator that yields each line in the file.file - the file object.throws: FileNotFoundError - when the file could not be found.e.g.withReader.readFromFile(open("test.csv",newline=""))asfile:forlineinfile:print(line)note: `line` is a string.
Package: csv-reconcile-geo
CSV Reconcile Geo distance scoring
pluginReconciliationScoringConfigurationFuture enhancementsCSV Reconcile Geo distance scoring pluginA scoring plugin forcsv-reconcileusing
geodesic distance. See csv-reconcile for details.ReconciliationThis plugin is used to reconcile values representing points on the
globe. It expects those values to be inwell-known
textformat for a point. That is, like so:POINT( longitude latitude ).The pre-processor automatically strips offliteral
datatypeswhen present as well as double quotes.The CSV column to be reconciled needs to be in the same format. In
addition, there must be at most one instance of any id column. For
instance, if reconciling againstcoordinate
locationfor awikidata
item, there must be at most
one location per item.ScoringThe scoring used is more or less arbitrary but has the following
properties:The highest score is 100 and occurs when the distance to the
reconciliation candidate is zeroThe lower the score the greater the distance to the reconciliation
candidateThe score is scaled so that a distance of 10km yields a score of 50ConfigurationThe plugin can be controlled viaSCOREOPTIONSin the csv-reconcile--configfile.SCOREOPTIONSis aPython
dictionaryand thus has the following formSCOREOPTIONS={ "key1":"value1,"key2":"value2"}.SCALEset distance in kilometers at which a score of 50 occurs. (
Default 10km ) e.g."SCALE":2COORDRANGEIf supplied do a precheck that both the latitude and
the longitude of the compared values are within range. This is for
performance to avoid the more expensive distance calculation for
points farther apart. e.g."COORDRANGE":"1"Future enhancementsSome of the current implementation was driven by the current design of
csv-reconcile. Both may be updated to accommodate the following:Allow for separate latitude and longitude column in the CSV fileAdd some scoring options such as the following:Allow for overriding the scaling functionetc.