Skip to content

Commit 8be1567

Browse files
committed
Use GitHub Pages for Doxygen docs
1 parent 8e9528d commit 8be1567

2 files changed

Lines changed: 78 additions & 31 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ Please keep reports grounded in real use cases—no contrived edge cases or phil
9999
100100
## Documentation
101101
102-
In addition to the [Features & Examples](#features--examples) below, a [fully-fledged online documentation](https://vincela.com/csv/) contains more examples, details, interesting features, and instructions for less common use cases.
102+
In addition to the [Features & Examples](#features--examples) below, a [fully-fledged online documentation](https://vincentlaucsb.github.io/csv-parser/) contains more examples, details, interesting features, and instructions for less common use cases.
103103
104104
## Sponsors
105105
If you use this library for work, please [become a sponsor](https://github.com/sponsors/vincentlaucsb). Your donation

docs/source/Doxy.md

Lines changed: 77 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -6,39 +6,95 @@ For quick examples, go to this project's [GitHub page](https://github.com/vincen
66
## Outline
77

88
### CSV Reading
9+
910
* csv::CSVFormat: \copybrief csv::CSVFormat
11+
* csv::CSVFormat::chunk_size(): Set chunk size for files with very large rows
1012
* csv::CSVReader
11-
* csv::CSVReader::n_rows(): \copybrief csv::CSVReader::n_rows()
12-
* csv::CSVReader::utf8_bom(): \copybrief csv::CSVReader::utf8_bom()
13-
* csv::CSVReader::get_format(): \copybrief csv::CSVReader::get_format()
14-
* Retrieving data
15-
* csv::CSVReader::iterator: Recommended
16-
* csv::CSVReader::begin()
17-
* csv::CSVReader::end()
18-
* csv::CSVReader::read_row()
13+
* csv::CSVReader::n_rows(): \copybrief csv::CSVReader::n_rows()
14+
* csv::CSVReader::utf8_bom(): \copybrief csv::CSVReader::utf8_bom()
15+
* csv::CSVReader::get_format(): \copybrief csv::CSVReader::get_format()
16+
* Retrieving data
17+
* csv::CSVReader::iterator: Recommended
18+
* csv::CSVReader::begin()
19+
* csv::CSVReader::end()
20+
* csv::CSVReader::read_row()
1921
* Convenience Functions
20-
* csv::parse()
21-
* csv::operator ""_csv()
22-
* csv::parse_no_header()
23-
* csv::operator ""_csv_no_header()
22+
* csv::parse()
23+
* csv::operator ""_csv()
24+
* csv::parse_no_header()
25+
* csv::operator ""_csv_no_header()
26+
* File Utilities
27+
* csv::get_file_info(): Returns row/column counts and detected format for a CSV file
28+
* csv::get_col_pos(): Returns the zero-based index of a named column
2429

2530
#### See also
2631
[Dealing with Variable Length CSV Rows](md_docs_source_variable_row_lengths.html)
2732

2833
#### Working with parsed data
2934
* csv::CSVRow: \copybrief csv::CSVRow
30-
* csv::CSVRow::operator std::vector<std::string>()
31-
* csv::CSVRow::iterator
32-
* csv::CSVRow::begin()
33-
* csv::CSVRow::end()
34-
* csv::CSVRow::to_json()
35-
* csv::CSVRow::to_json_array()
35+
* csv::CSVRow::operator std::vector<std::string>()
36+
* csv::CSVRow::iterator
37+
* csv::CSVRow::begin()
38+
* csv::CSVRow::end()
39+
* csv::CSVRow::to_json()
40+
* csv::CSVRow::to_json_array()
3641
* csv::CSVField
37-
* csv::CSVField::get(): \copybrief csv::CSVField::get()
38-
* csv::CSVField::operator==()
42+
* csv::CSVField::get(): \copybrief csv::CSVField::get()
43+
* csv::CSVField::operator==()
44+
45+
### DataFrame
46+
47+
An in-memory keyed table built from a csv::CSVReader. Supports O(1) key lookup,
48+
column extraction, editing, and grouping.
49+
50+
* csv::DataFrame: Main container class (template parameter is the key type, default `std::string`)
51+
* Construction
52+
* From csv::CSVReader with an explicit key column
53+
* Inspection
54+
* csv::DataFrame::n_rows()
55+
* csv::DataFrame::n_cols()
56+
* csv::DataFrame::size()
57+
* csv::DataFrame::empty()
58+
* csv::DataFrame::has_column()
59+
* csv::DataFrame::get_col_names()
60+
* Row access by key
61+
* csv::DataFrame::operator[](): Access by key value (O(1))
62+
* csv::DataFrame::contains(): Check if a key exists
63+
* csv::DataFrame::try_get(): Non-throwing keyed lookup
64+
* Row access by position
65+
* csv::DataFrame::iloc(): Positional access by index (use instead of `operator[](size_t)` for integer-keyed DataFrames)
66+
* csv::DataFrame::try_get(): Non-throwing positional lookup (overloaded on `size_t`)
67+
* Column extraction
68+
* csv::DataFrame::column(): Extract all values from a named column as `std::vector<T>`
69+
* Editing
70+
* csv::DataFrame::set(): Edit a cell by key and column name
71+
* csv::DataFrame::set_at(): Edit a cell by position and column name
72+
* csv::DataFrame::erase_row(): Remove a row by key
73+
* csv::DataFrame::erase_row_at(): Remove a row by position
74+
* Grouping
75+
* csv::DataFrame::group_by(): Group row indices by an arbitrary key function or column name
76+
* Iteration
77+
* csv::DataFrame::begin()
78+
* csv::DataFrame::end()
79+
* csv::DataFrameRow: Proxy row object returned by DataFrame access methods
80+
* csv::DataFrameRow::operator[](): Access a field by column name
81+
* csv::DataFrameRow::size()
82+
* csv::DataFrameRow::empty()
83+
* csv::DataFrameRow::get_col_names()
84+
* csv::DataFrameOptions: Configuration for DataFrame construction
85+
* Duplicate key policy (`OVERWRITE` or `KEEP_FIRST`)
86+
* `set_key_column()`: Specify which column to use as the key
87+
* `set_throw_on_missing_key()`: Control exception behavior for missing keys
3988

4089
### Statistics
4190
* csv::CSVStat
91+
* csv::CSVStat::get_mean(): Per-column means
92+
* csv::CSVStat::get_variance(): Per-column variances
93+
* csv::CSVStat::get_mins(): Per-column minimums
94+
* csv::CSVStat::get_maxes(): Per-column maximums
95+
* csv::CSVStat::get_counts(): Per-column value frequency counts
96+
* csv::CSVStat::get_dtypes(): Per-column inferred data types
97+
* csv::CSVStat::get_col_names()
4298

4399
### CSV Writing
44100
* csv::make_csv_writer(): Construct a csv::CSVWriter
@@ -56,16 +112,7 @@ For quick examples, go to this project's [GitHub page](https://github.com/vincen
56112
See "How does automatic delimiter detection work?"
57113

58114
### How does automatic delimiter detection work?
59-
First, the CSV reader attempts to parse the first 100 lines of a CSV file as if the delimiter were a pipe, tab, comma, etc.
60-
Out of all the possible delimiter choices, the delimiter which produces the highest number of `rows * columns` (where all rows
61-
are of a consistent length) is chosen as the winner.
62-
63-
However, if the CSV file has leading comments, or has less than 100 lines, a second heuristic will be used. The CSV reader again
64-
parses the first 100 lines using each candidate delimiter, but tallies up the length of each row parsed. Then, the delimiter with
65-
the largest most common row length `n` is chosen as the winner, and the line number where the first row of length `n` occurs
66-
is chosen as the starting row.
67-
68-
Because you can subclass csv::CSVReader, you can implement your own guessing hueristic. csv::internals::CSVGuesser may be used as a helpful guide in doing so.
115+
See the implementation in csv::internals::_guess_format() — the source is the authoritative reference and is kept up to date.
69116

70117
### Is the CSV parser thread-safe?
71118
This library already does a lot of work behind the scenes to use threads to squeeze

0 commit comments

Comments
 (0)