Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additions for after the thread-pool version is released #278

Merged
merged 17 commits into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 29 additions & 29 deletions data/csv2_format_data.csv
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
INDEX:28:<ulong>,ul_col:28:<ulong>,dbl_col_2:26:<double>,bool_col:6:<bool>,str_col:25:<string>,xint_col:28:<int>,dbl_col:27:<double>
123450,123450,0.998,1,4% of something,1,1.2345
123451,123451,0.3456,1,Description 4/5,2,2.2345
123452,123452,0.056,1,This is bad,3,3.2345
123450,123450,0.15678,0,3.4% of GDP,4,4.2345
123455,123455,0.00345,0,Market drops,5,5.2345
123450,123450,0.923,1,Market pulls back,3,3
123449,123449,0.06743,,$15 increase,7,0.9999
123450,123450,0.1,,Running fast,3,10
123451,123451,0.0056,,C++14 development,9,4.25
123450,123450,0.07865,,Some explanation,10,0.009
123452,123452,0.0111,,More strings,3,8
123450,123450,0.1002,,Bonds vs. Equities,2,2.2222
123455,123455,-0.8888,,Almost done,3,3.3333
123450,123450,0.14,,XXXX04,14,11
123454,123454,0.0456,,XXXX2,2,5.25
123450,123450,0.078654,,XXXX3,2,1.009
123450,123450,-0.8999,,XXXX4,2,2.111
123457,123457,0.8002,,XXXX4,3,9
123458,123458,-0.9888,,XXXX5,2,3.2222
123459,123459,0.2,,XXXX6,3,4.3333
123450,123450,0.1056,,XXXX7,3,12
123441,123441,0.87865,,XXXX10,3,6.25
123442,123442,-0.6999,,XXXX11,3,2.009
123432,123432,0.4111,,XXXX02,3,3.111
123450,123450,0.1902,,XXXX03,36,10
123450,123450,-0.4888,,,2,4.2222
123435,123435,,,,45,5.3333
123450,123450,,,,2,
INDEX:28:<ulong>,ul_col:28:<ulong>,dbl_col_2:26:<double>,bool_col:6:<bool>,str_col:25:<string>,xint_col:28:<int>,dbl_col:27:<double>,char_col:27:<char>,uchar_col:27:<uchar>
123450,123450,0.998,1,4% of something,1,1.2345,C,B
123451,123451,0.3456,1,Description 4/5,2,2.2345,23,B
123452,123452,0.056,1,This is bad,3,3.2345,^,&
123450,123450,0.15678,0,3.4% of GDP,4,4.2345,F,250
123455,123455,0.00345,0,Market drops,5,5.2345,120,B
123450,123450,0.923,1,Market pulls back,3,3,78,B
123449,123449,0.06743,,$15 increase,7,0.9999,,B
123450,123450,0.1,,Running fast,3,10,C,B
123451,123451,0.0056,,C++14 development,9,4.25,C,
123450,123450,0.07865,,Some explanation,10,0.009,C,B
123452,123452,0.0111,,More strings,3,8,C,B
123450,123450,0.1002,,Bonds vs. Equities,2,2.2222,C,40
123455,123455,-0.8888,,Almost done,3,3.3333,C,B
123450,123450,0.14,,XXXX04,14,11,C,B
123454,123454,0.0456,,XXXX2,2,5.25,C,B
123450,123450,0.078654,,XXXX3,2,1.009,,
123450,123450,-0.8999,,XXXX4,2,2.111,C,
123457,123457,0.8002,,XXXX4,3,9,C,B
123458,123458,-0.9888,,XXXX5,2,3.2222,,B
123459,123459,0.2,,XXXX6,3,4.3333,C,B
123450,123450,0.1056,,XXXX7,3,12,C,B
123441,123441,0.87865,,XXXX10,3,6.25,C,B
123442,123442,-0.6999,,XXXX11,3,2.009,C,B
123432,123432,0.4111,,XXXX02,3,3.111,C,B
123450,123450,0.1902,,XXXX03,36,10,C,B
123450,123450,-0.4888,,,2,4.2222,C,B
123435,123435,,,,45,5.3333,C,B
123450,123450,,,,2,,C,B
6 changes: 6 additions & 0 deletions data/sample_data.csv
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,9 @@ str_col:28:<string>:XXXX10,XXXX11,XXXX01,XXXX02,XXXX03,XXXX6,XXXX7,Running fast,
dbl_col:28:<double>:2.009,3.111,10,4.2222,5.3333,12,6.25,10,0.9999,1.2345,4.2345,3,8,3.3333,2.2345,4.25,3.2345,0.009,1.111,5.25,11,5.2345,2.2222,1.009,2.111,9,3.2222,4.3333,
dbl_col_2:28:<double>:0.87865,-0.6999,0.4111,0.1902,-0.4888,0.2,0.1056,0.1,0.06743,0.998,0.15678,0.923,0.0111,-0.8888,0.3456,0.0056,0.056,0.07865,-0.9999,0.0456,0.14,0.00345,0.1002,0.078654,-0.8999,0.01119,0.8002,-0.9888,
bool_col:28:<bool>:0,1,1,1,0,0,1,0,0,0,1,0,1,0,0,0,0,0,0,0,1,0,1,0,0,1,0,0,
Map 1:4:<str_dbl_map>:3{label one 1:123.0|label one 2:-782.5|label one 3:444.44},3{label two 1:123.0|label two 2:-782.5|label two 3:444.44},3{label three 1:123.0|label three 2:-782.5|label three 3:444.44},3{label four 1:123.0|label four 2:-782.5|label four 3:444.44},
Unordered Map:4:<str_dbl_unomap>:3{Key one 1:123.0|Key one 2:-782.5|Key one 3:444.44},3{Key two 1:123.0|Key two 2:-782.5|Key two 3:444.44},3{Key three 1:123.0|Key three 2:-782.5|Key three 3:444.44},3{Key four 1:123.0|Key four 2:-782.5|Key four 3:444.44},
Str Vec:4:<str_vec>:4[bbb|aaa|zzz|ddd],4[aaa|bbb|ccc|www],4[123|abc|345|list],3[bbb|aaa|zzz],
Double Set:4:<dbl_set>:3[123.0|-782.5|444.44],3[1:123.0|-782.5|:444.44],3[123.0|-782.5|444.44],4[123.0|-782.5|444.44|100.5],
Str Set:4:<str_set>:3[123.0|-782.5|444.44],3[1:123.0|-782.5|:444.44],3[123.0|-782.5|444.44],4[123.0|-782.5|444.44|100.5],
Z Score:4:<dbl_vec>:10[1.95474040557|0.552535091086|0.775388936446|-0.561817339812|0.106794118727|-0.153218675013|-0.896114748672|-1.72258101434|-0.301804546072|0.246077772077],10[-0.985180680575|-0.338649566179|1.37000434149|0.831246802651|-0.415610988193|1.06213106869|0.554158098662|0.507981245453|-1.55472278822|-1.03135753378],10[-1.39575784008|-1.62506351709|-0.907239380237|-0.159508137551|0.807541881212|0.937157205458|0.578236204203|0.717820563726|-0.0398797142361|1.0866927346],10[1.94246107491|-0.062340594565|0.246115232403|-1.24462409799|-0.190844664632|0.8115331407|0.381021476571|-1.60448155299|-0.422151990754|0.143311976349],
4 changes: 3 additions & 1 deletion data/sample_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@
"This is a test"]},
"col_2":{"N":12,"T":"double","D":[8,9,10,11,12,13,14,15,16,17,18, 777.78]},
"col_1":{"N":12,"T":"double","D":[1,2,3,4,5,6,7,8,9,10,11,
55.55]}
55.55]},
"col_char":{"N":12,"T":"char","D":[8,C,F,$,,8,120,88,h,u,18, 78]},
"col_uchar":{"N":12,"T":"uchar","D":[8,C,F,$,,8,220,88,h,&,18, 255]}
}
4 changes: 3 additions & 1 deletion data/sample_data_2.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@
"This is a test"]},
"col_2_2":{"N":12,"T":"double","D":[8,9,10,11,12,13,14,15,16,17,18, 777.78]},
"col_1_2":{"N":12,"T":"double","D":[1,2,3,4,5,6,7,8,9,10,11,
55.55]}
55.55]},
"col_char":{"N":12,"T":"char","D":[8,C,F,$,,8,120,88,h,u,18, 78]},
"col_uchar":{"N":12,"T":"uchar","D":[8,C,F,$,,8,220,88,h,&,18, 255]}
}
2 changes: 2 additions & 0 deletions data/sample_data_no_index.csv
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ str_col_no_idx:28:<string>:XXXX10,XXXX11,XXXX01,XXXX02,XXXX03,XXXX6,XXXX7,Runnin
dbl_col_no_idx:28:<double>:2.009,3.111,10,4.2222,5.3333,12,6.25,10,0.9999,1.2345,4.2345,3,8,3.3333,2.2345,4.25,3.2345,0.009,1.111,5.25,11,5.2345,2.2222,1.009,2.111,9,3.2222,4.3333,
dbl_col_2_no_idx:28:<double>:0.87865,-0.6999,0.4111,0.1902,-0.4888,0.2,0.1056,0.1,0.06743,0.998,0.15678,0.923,0.0111,-0.8888,0.3456,0.0056,0.056,0.07865,-0.9999,0.0456,0.14,0.00345,0.1002,0.078654,-0.8999,0.01119,0.8002,-0.9888,
bool_col_no_idx:28:<bool>:0,1,1,1,0,0,1,0,0,0,1,0,1,0,0,0,0,0,0,0,1,0,1,0,0,1,0,0,
char_col:6:<char>:C,%,120,,65,!
uchar_col:6:<uchar>:C,%,250,,65,!
4 changes: 3 additions & 1 deletion data/sample_data_no_index.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@
"This is a test"]},
"col_2_no_idx":{"N":12,"T":"double","D":[8,9,10,11,12,13,14,15,16,17,18, 777.78]},
"col_1_no_idx":{"N":12,"T":"double","D":[1,2,3,4,5,6,7,8,9,10,11,
55.55]}
55.55]},
"col_char_no_idx":{"N":12,"T":"char","D":[8,C,F,$,,8,120,88,h,u,18, 78]},
"col_uchar_no_idx":{"N":12,"T":"uchar","D":[8,C,F,$,,8,220,88,h,&,18, 255]}
}
9 changes: 9 additions & 0 deletions data/sample_data_string_index.csv
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,12 @@ str_col:28:<string>:XXXX10,XXXX11,XXXX01,XXXX02,XXXX03,XXXX6,XXXX7,Running fast,
dbl_col:28:<double>:2.009,3.111,10,4.2222,5.3333,12,6.25,10,0.9999,1.2345,4.2345,3,8,3.3333,2.2345,4.25,3.2345,0.009,1.111,5.25,11,5.2345,2.2222,1.009,2.111,9,3.2222,4.3333,
dbl_col_2:28:<double>:0.87865,-0.6999,0.4111,0.1902,-0.4888,0.2,0.1056,0.1,0.06743,0.998,0.15678,0.923,0.0111,-0.8888,0.3456,0.0056,0.056,0.07865,-0.9999,0.0456,0.14,0.00345,0.1002,0.078654,-0.8999,0.01119,0.8002,-0.9888,
bool_col:28:<bool>:0,1,1,1,0,0,1,0,0,0,1,0,1,0,0,0,0,0,0,0,1,0,1,0,0,1,0,0,
char_col:6:<char>:C,%,120,,65,!,
uchar_col:6:<uchar>:C,%,250,,65,!,
Map 1:4:<str_dbl_map>:3{label one 1:123.0|label one 2:-782.5|label one 3:444.44},3{label two 1:123.0|label two 2:-782.5|label two 3:444.44},3{label three 1:123.0|label three 2:-782.5|label three 3:444.44},3{label four 1:123.0|label four 2:-782.5|label four 3:444.44},
Unordered Map:4:<str_dbl_unomap>:3{Key one 1:123.0|Key one 2:-782.5|Key one 3:444.44},3{Key two 1:123.0|Key two 2:-782.5|Key two 3:444.44},3{Key three 1:123.0|Key three 2:-782.5|Key three 3:444.44},3{Key four 1:123.0|Key four 2:-782.5|Key four 3:444.44},
Str Vec:4:<str_vec>:4[bbb|aaa|zzz|ddd],4[aaa|bbb|ccc|www],4[123|abc|345|list],3[bbb|aaa|zzz],
Double Set:4:<dbl_set>:3[123.0|-782.5|444.44],3[1:123.0|-782.5|:444.44],3[123.0|-782.5|444.44],4[123.0|-782.5|444.44|100.5],
Str Set:4:<str_set>:3[123.0|-782.5|444.44],3[1:123.0|-782.5|:444.44],3[123.0|-782.5|444.44],4[123.0|-782.5|444.44|100.5],
Z Score:4:<dbl_vec>:10[1.95474040557|0.552535091086|0.775388936446|-0.561817339812|0.106794118727|-0.153218675013|-0.896114748672|-1.72258101434|-0.301804546072|0.246077772077],10[-0.985180680575|-0.338649566179|1.37000434149|0.831246802651|-0.415610988193|1.06213106869|0.554158098662|0.507981245453|-1.55472278822|-1.03135753378],10[-1.39575784008|-1.62506351709|-0.907239380237|-0.159508137551|0.807541881212|0.937157205458|0.578236204203|0.717820563726|-0.0398797142361|1.0866927346],10[1.94246107491|-0.062340594565|0.246115232403|-1.24462409799|-0.190844664632|0.8115331407|0.381021476571|-1.60448155299|-0.422151990754|0.143311976349],

22 changes: 21 additions & 1 deletion docs/HTML/DataFrame.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
<LI>To start off on basic operations, see <a href="https://github.com/hosseinmoein/DataFrame/blob/master/examples/hello_world.cc">Hello World</a></LI>
<LI>Also, see <a href="https://htmlpreview.github.io/?https://github.com/hosseinmoein/DataFrame/blob/master/docs/HTML/DataFrameTypes.html">DataFrame Library Types</a></LI>
<LI>DataFrame has both sync and async interfaces, latter returning C++ std::futures</LI>
<LI><I>Read <B>views</B>, <B>visitors</B>, <B>multithreading</B>, and <B> memory alignment</B> sections below, before getting serious about this library</I></LI>
<LI><I>Read <B>multithreading</B>, <B>views</B>, <B>visitors</B>, and <B>memory alignment</B> sections below, before getting serious about this library</I></LI>
</UL>

<BR><HR COLOR="Orange" SIZE="5">
Expand Down Expand Up @@ -181,6 +181,10 @@ <H2><font color="blue">API Reference with code samples</font></H2>
<td title="Bucketizes a column data -- Async"><a href="https://htmlpreview.github.io/?https://github.com/hosseinmoein/DataFrame/blob/master/docs/HTML/bucketize.html">bucketize_async</a>( )</td>
</tr>

<tr class="item" onmouseover="this.style.backgroundColor='#ffff66';" onmouseout="this.style.backgroundColor='#d4e3e5';">
<td title="Clears/Empties the DataFrame"><a href="https://htmlpreview.github.io/?https://github.com/hosseinmoein/DataFrame/blob/master/docs/HTML/remove_column.html">clear</a>( )</td>
</tr>

<tr class="item" onmouseover="this.style.backgroundColor='#ffff66';" onmouseout="this.style.backgroundColor='#d4e3e5';">
<td title="Get column index for the given column name"><a href="https://htmlpreview.github.io/?https://github.com/hosseinmoein/DataFrame/blob/master/docs/HTML/col_name_to_idx.html">col_name_to_idx</a>( )</td>
</tr>
Expand Down Expand Up @@ -265,6 +269,10 @@ <H2><font color="blue">API Reference with code samples</font></H2>
<td title="Gets data by index"><a href="https://htmlpreview.github.io/?https://github.com/hosseinmoein/DataFrame/blob/master/docs/HTML/get_data_by_idx.html">get_data_by_idx</a>( 2 )</td>
</tr>

<tr class="item" onmouseover="this.style.backgroundColor='#ffff66';" onmouseout="this.style.backgroundColor='#d4e3e5';">
<td title="Gets data by applying Glob-like (SQL like clause) pattern matching"><a href="https://htmlpreview.github.io/?https://github.com/hosseinmoein/DataFrame/blob/master/docs/HTML/get_data_by_like.html">get_data_by_like</a>( 2 )</td>
</tr>

<tr class="item" onmouseover="this.style.backgroundColor='#ffff66';" onmouseout="this.style.backgroundColor='#d4e3e5';">
<td title="Gets data by location"><a href="https://htmlpreview.github.io/?https://github.com/hosseinmoein/DataFrame/blob/master/docs/HTML/get_data_by_loc.html">get_data_by_loc</a>( 2 )</td>
</tr>
Expand Down Expand Up @@ -309,6 +317,10 @@ <H2><font color="blue">API Reference with code samples</font></H2>
<td title="Gets view by index"><a href="https://htmlpreview.github.io/?https://github.com/hosseinmoein/DataFrame/blob/master/docs/HTML/get_data_by_idx.html">get_view_by_idx</a>( 2 )</td>
</tr>

<tr class="item" onmouseover="this.style.backgroundColor='#ffff66';" onmouseout="this.style.backgroundColor='#d4e3e5';">
<td title="Gets view by applying Glob-like (SQL like clause) pattern matching"><a href="https://htmlpreview.github.io/?https://github.com/hosseinmoein/DataFrame/blob/master/docs/HTML/get_data_by_like.html">get_view_by_like</a>( 2 )</td>
</tr>

<tr class="item" onmouseover="this.style.backgroundColor='#ffff66';" onmouseout="this.style.backgroundColor='#d4e3e5';">
<td title="Gets view by location"><a href="https://htmlpreview.github.io/?https://github.com/hosseinmoein/DataFrame/blob/master/docs/HTML/get_data_by_loc.html">get_view_by_loc</a>( 2 )</td>
</tr>
Expand Down Expand Up @@ -349,6 +361,10 @@ <H2><font color="blue">API Reference with code samples</font></H2>
<td title="Returns true if the column exists"><a href="https://htmlpreview.github.io/?https://github.com/hosseinmoein/DataFrame/blob/master/docs/HTML/has_column.html">has_column</a>( 2 )</td>
</tr>

<tr class="item" onmouseover="this.style.backgroundColor='#ffff66';" onmouseout="this.style.backgroundColor='#d4e3e5';">
<td title="Returns number of inversions in the named column"><a href="https://htmlpreview.github.io/?https://github.com/hosseinmoein/DataFrame/blob/master/docs/HTML/inversion_count.html">inversion_count</a>( )</td>
</tr>

<tr class="item" onmouseover="this.style.backgroundColor='#ffff66';" onmouseout="this.style.backgroundColor='#d4e3e5';">
<td title="Returns true if DataFrames are equal"><a href="https://htmlpreview.github.io/?https://github.com/hosseinmoein/DataFrame/blob/master/docs/HTML/is_equal.html">is_equal</a>( )</td>
</tr>
Expand Down Expand Up @@ -509,6 +525,10 @@ <H2><font color="blue">API Reference with code samples</font></H2>
<td title="Sorts DataFrame -- Async"><a href="https://htmlpreview.github.io/?https://github.com/hosseinmoein/DataFrame/blob/master/docs/HTML/sort.html">sort_async</a>( 5 )</td>
</tr>

<tr class="item" onmouseover="this.style.backgroundColor='#ffff66';" onmouseout="this.style.backgroundColor='#d4e3e5';">
<td title="Swaps data between two DataFrames"><a href="https://htmlpreview.github.io/?https://github.com/hosseinmoein/DataFrame/blob/master/docs/HTML/remove_column.html">swap</a>( )</td>
</tr>

<tr class="item" onmouseover="this.style.backgroundColor='#ffff66';" onmouseout="this.style.backgroundColor='#d4e3e5';">
<td title="Converts the DataFrame into a string"><a href="https://htmlpreview.github.io/?https://github.com/hosseinmoein/DataFrame/blob/master/docs/HTML/write.html">to_string</a>( )</td>
</tr>
Expand Down
Loading
Loading