You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+131-2Lines changed: 131 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,6 +29,7 @@
29
29
-[Handling Variable Numbers of Columns](#handling-variable-numbers-of-columns)
30
30
-[Setting Column Names](#setting-column-names)
31
31
-[Parsing an In-Memory String](#parsing-an-in-memory-string)
32
+
-[DataFrames for Random Access and Updates](#dataframes-for-random-access-and-updates)
32
33
-[Writing CSV Files](#writing-csv-files)
33
34
34
35
## Motivation
@@ -38,7 +39,7 @@ There's plenty of other CSV parsers in the wild, but I had a hard time finding w
38
39
A high performance CSV parser allows you to take advantage of the deluge of large datasets available. By using overlapped threads, memory mapped IO, and
39
40
minimal memory allocation, this parser can quickly tackle large CSV files--even if they are larger than RAM.
40
41
41
-
In fact, [according to Visual Studio's profier](https://github.com/vincentlaucsb/csv-parser/wiki/Microsoft-Visual-Studio-CPU-Profiling-Results) this
42
+
In fact, [according to Visual Studio's profiler](https://github.com/vincentlaucsb/csv-parser/wiki/Microsoft-Visual-Studio-CPU-Profiling-Results) this
42
43
CSV parser **spends almost 90% of its CPU cycles actually reading your data** as opposed to getting hung up in hard disk I/O or pushing around memory.
43
44
44
45
#### Show me the numbers
@@ -103,6 +104,9 @@ In addition to the [Features & Examples](#features--examples) below, a [fully-fl
103
104
If you use this library for work, please [become a sponsor](https://github.com/sponsors/vincentlaucsb). Your donation
104
105
will fund continued maintenance and development of the project.
105
106
107
+
Shameless plug: If you like this library, check out my side project
108
+
[experiencer](https://github.com/vincentlaucsb/experiencer) — a WYSIWYG resume editor with clean HTML/CSS output.
109
+
106
110
## Integration
107
111
108
112
This library was developed with Microsoft Visual Studio and is compatible with >g++ 7.5 and clang.
@@ -248,6 +252,7 @@ for (auto& row: reader) {
248
252
If your CSV has lots of numeric values, you can also have this parser (lazily)
249
253
convert them to the proper data type.
250
254
255
+
*`try_get<T>()` is a non-throwing version of `get<T>` which returns `bool` if the conversion was successful
251
256
* Type checking is performed on conversions to prevent undefined behavior and integer overflow
252
257
* Negative numbers cannot be blindly converted to unsigned integer types
253
258
*`get<float>()`, `get<double>()`, and `get<long double>()` are capable of parsing numbers written in scientific notation.
For files that fit comfortably in memory, `DataFrame` provides fast and powerful keyed access, in-place updates, and grouping operations—all built on the same high-performance parser. It uses the same parsing pipeline as `CSVReader` but retains the results in memory for random access.
435
+
436
+
**Creating a DataFrame with Keyed Access**
437
+
```cpp
438
+
# include"csv.hpp"
439
+
440
+
usingnamespacecsv;
441
+
442
+
...
443
+
444
+
// Shortest form: pass a filename directly with DataFrameOptions
0 commit comments