RSLM-DevOps 1.0.0
|
Data manipulation library. Plus de détails...
Fonctions membres publiques | |
DataFrame (Path path, Character csvDelimiter, Class< H > classParameterH, Class< T > classParameterT) throws IOException | |
Read CSV file for a given file path. | |
DataFrame (Path path, Class< H > classParameterH, Class< T > classParameterT) throws IOException | |
Read CSV file for a given file path. | |
DataFrame (List< H > header, List< List< T > > rows, Class< H > classParameterH, Class< T > classParameterT) | |
Build a DataFrame from header and rows. | |
DataFrame (HashMap< H, List< T > > content, Integer[] indexes, Class< H > classParameterH, Class< T > classParameterT) | |
Build a DataFrame from content Map and indexes. | |
DataFrame (HashMap< H, List< T > > content, Class< H > classParameterH, Class< T > classParameterT) | |
Build a DataFrame from content Map. | |
Integer[] | getIndexes () |
Getter for the DataFrame index array. | |
void | setIndexes (Integer[] indexes) |
Setter for the DataFrame index array. | |
HashMap< H, List< T > > | getContent () |
Getter for the DataFrame content map. | |
void | setContent (HashMap< H, List< T > > content) |
Setter for the DataFrame Content map. | |
DataFrame< H, T > | selectDataFrameByIndex (Integer[] indexes) throws Exception |
Select a part of the current DataFrame by using indexes and return a new DataFrame. | |
DataFrame< H, T > | selectDataFrameByColumn (List< H > columns) throws Exception |
Select a part of the current DataFrame by using columns and return a new DataFrame. | |
String | toStringDisplay () |
Display the DataFrame in a well-aligned table format, including predefined indices if available. | |
String | toStringDisplayByIndex (Integer[] indexes) throws Exception |
Display in a table the given dataframe for the given indexes. | |
String | toStringDisplayByHeader (List< H > columnFilter) throws Exception |
Display in a table the given dataframe for the given indexes. | |
String | toStringPartialDisplay (int nbLines, boolean mode) |
Display in a table the given dataframe. | |
boolean | hasIndex () |
Check if the current DataFrame index are initialised. | |
double | sum (H header) |
Calculate sum of a column. | |
double | average (H header) |
Calculate average of a column. | |
T | min (H header, Comparator< T > comparator) |
Find minimum value in a column. | |
T | max (H header, Comparator< T > comparator) |
Find maximum value in a column. | |
DataFrame< H, T > | selectAdvanced (Map< H, Predicate< T > > criteria) throws Exception |
Advanced selection based on custom predicates per column that filters entire rows. | |
Fonctions membres privées | |
void | buildTableDelimiter (StringBuilder builder, Map< H, Integer > columnWidths, int indexWidth, boolean hasIndex) |
Builds the delimiter line for the table based on column widths, including index if exists. | |
int | getIndexWidth () |
Retrieve max the String length of the current index. | |
void | checkIndexInput (Integer[] indexes) throws Exception |
Run a checklist to verify the array of index compare to the saved index array. | |
void | checkHeaderInput (List< H > header) throws Exception |
Run a checklist to verify the list of header compare to the saved header. | |
Integer | retrieveIndexWhenAtDataFramePosition (Integer[] indexes, int i) |
Get index at referenced position. | |
T | convertValueT (String input) |
H | convertValueH (String input) |
Attributs privés | |
final Class< T > | classParameterT |
final Class< H > | classParameterH |
Integer[] | indexes |
HashMap< H, List< T > > | content = new HashMap<>() |
Data manipulation library.
<H> | Column header type |
<T> | Content type |
|
inline |
Read CSV file for a given file path.
path | file path |
IOException | If unable to open the file |
Note: csv default delimiter character is ;
|
inline |
Read CSV file for a given file path.
path | file path |
IOException | If unable to open the file |
Note: csv default delimiter character is ;
|
inline |
Build a DataFrame from header and rows.
header | list of header to declare |
rows | list of rows to declare |
|
inline |
Build a DataFrame from content Map and indexes.
content | Data frame content shaped has a map |
indexes | Data frame indexes |
|
inline |
Build a DataFrame from content Map.
content | Data frame content shaped has a map |
|
inline |
Calculate average of a column.
header | selected column |
|
inlineprivate |
Builds the delimiter line for the table based on column widths, including index if exists.
builder | StringBuilder to which the delimiter line is appended. |
columnWidths | Map with the widths for each column. |
indexWidth | Width of the index column, if indices are used. |
hasIndex | Boolean indicating if indices are present. |
|
inlineprivate |
Run a checklist to verify the list of header compare to the saved header.
header | list to check |
Exception | check failed with reason |
|
inlineprivate |
Run a checklist to verify the array of index compare to the saved index array.
indexes | array to check |
Exception | check failed with reason |
|
inlineprivate |
|
inlineprivate |
|
inline |
Getter for the DataFrame content map.
|
inline |
Getter for the DataFrame index array.
|
inlineprivate |
Retrieve max the String length of the current index.
|
inline |
Check if the current DataFrame index are initialised.
|
inline |
Find maximum value in a column.
header | selected column |
|
inline |
Find minimum value in a column.
header | selected column |
|
inlineprivate |
Get index at referenced position.
indexes | list of index |
i | current position |
|
inline |
Advanced selection based on custom predicates per column that filters entire rows.
criteria | Map of headers to their respective predicates for selection. |
Exception | If there are issues with the headers. |
|
inline |
Select a part of the current DataFrame by using columns and return a new DataFrame.
columns | to filter on |
Exception | Bad column selection |
|
inline |
Select a part of the current DataFrame by using indexes and return a new DataFrame.
indexes | to filter on |
Exception | Bad index selection |
|
inline |
Setter for the DataFrame Content map.
content | map of element by column header |
|
inline |
Setter for the DataFrame index array.
indexes | array |
|
inline |
Calculate sum of a column.
header | selected column |
|
inline |
Display the DataFrame in a well-aligned table format, including predefined indices if available.
Example of the result: +---+----+----+ | | a | c | +---+----+----+ | 1 | 10 | 30 | +---+----+----+ | 2 | 15 | 35 | +---+----+----+
|
inline |
Display in a table the given dataframe for the given indexes.
Example of result: +---+----+----+ | | a | c | +---+----+----+ | 1 | 10 | 30 | +---+----+----+ | 2 | 15 | 35 | +---+----+----+
|
inline |
Display in a table the given dataframe for the given indexes.
Example of result: +---+----+----+ | | a | c | +---+----+----+ | 1 | 10 | 30 | +---+----+----+ | 2 | 15 | 35 | +---+----+----+
|
inline |
Display in a table the given dataframe.
nbLines | number of lines to display |
mode | true = first n lines // false = last n lines |
Example of result: +---+----+----+ | | a | c | +---+----+----+ | 1 | 10 | 30 | +---+----+----+ | 2 | 15 | 35 | +---+----+----+
|
private |
|
private |
|
private |
|
private |