1CSVPY(1)                            csvkit                            CSVPY(1)
2
3
4

NAME

6       csvpy - csvpy Documentation
7

DESCRIPTION

9       Loads  a  CSV file into a agate.csv.Reader object and then drops into a
10       Python shell so the user can inspect the data however they see fit:
11
12          usage: csvpy [-h] [-d DELIMITER] [-t] [-q QUOTECHAR] [-u {0,1,2,3}] [-b]
13                       [-p ESCAPECHAR] [-z FIELD_SIZE_LIMIT] [-e ENCODING] [-L LOCALE]
14                       [-S] [--blanks] [--date-format DATE_FORMAT]
15                       [--datetime-format DATETIME_FORMAT] [-H] [-K SKIP_LINES] [-v]
16                       [-l] [--zero] [-V] [--dict] [--agate]
17                       [FILE]
18
19          Load a CSV file into a CSV reader and then drop into a Python shell.
20
21          positional arguments:
22            FILE                  The CSV file to operate on. If omitted, will accept
23                                  input as piped data via STDIN.
24
25          optional arguments:
26            -h, --help            show this help message and exit
27            --dict                Load the CSV file into a DictReader.
28            --agate               Load the CSV file into an agate table.
29
30       This tool will automatically use the IPython shell if it is  installed,
31       otherwise it will use the running Python shell.
32
33       NOTE:
34          Due  to  platform  limitations,  csvpy does not accept file input as
35          piped data via STDIN.
36
37       See also: Arguments common to all tools.
38

EXAMPLES

40       Basic use:
41
42          csvpy examples/dummy.csv
43          Welcome! "examples/dummy.csv" has been loaded in a reader object named "reader".
44          >>> reader.next()
45          ['a', 'b', 'c']
46
47       As a dictionary:
48
49          csvpy --dict examples/dummy.csv
50          Welcome! "examples/dummy.csv" has been loaded in a DictReader object named "reader".
51          >>> reader.next()
52          {'a': '1', 'c': '3', 'b': '2'}
53
54       As an agate table:
55
56          csvpy --agate examples/dummy.csv
57          Welcome! "examples/dummy.csv" has been loaded in a from_csv object named "reader".
58          >>> reader.print_table()
59          |    a | b | c |
60          | ---- | - | - |
61          | True | 2 | 3 |
62

AUTHOR

64       Christopher Groskopf
65
67       2023, Christopher Groskopf
68
69
70
71
721.1.1                            Jul 21, 2023                         CSVPY(1)
Impressum