src.core.io.csv module

this file contains code, that does I/O functionality between .csv files and DataFrames

src.core.io.csv.DataToCsv(tabledict, typ)[source]

A method, which adds the passed data to the .csv database

Parameters:
  • metadata (list[dict]) – the metadata of a game

  • teamdata (list[dict]) – the red- and blueteamdata of a game

  • playerdata (list[dict]) – the data of all ten players of a game

  • tabledict (dict[GameTable, DataFrame])

  • typ (ImportType)

Return type:

None

src.core.io.csv.csvToData()[source]

reads the internal database .csv files

Returns:

data – contains a list of data, namely meta-, team- and playerdata

Return type:

dict[GameTable | TimeTable, pd.Dataframe]

src.core.io.csv.readCsv(csvdir)[source]
Parameters:

csvdir (str)

Return type:

DataFrame

src.core.io.csv.runSelectOnCsv(query, tables)[source]

a helper method, which makes pd.Dataframes compatible with SELECT queries

Parameters:
  • query (str) – a proper SELECT query

  • tables (dict[str, pd.DataFrame]) – tables describes a dict, where the ‘tablename’ gets mapped to the dataframe

Returns:

selected_frame – the return of the SELECT query

Return type:

pd.DataFrame

Dependency Diagrams (without externals):

digraph imports {
  rankdir=LR;
  node [shape=box];
  "src.core.io.wrapper" -> "src.core.io.csv";
  "src.core.process.writing" -> "src.core.io.csv";
}

Import dependencies (collapsed)

Dependency Diagrams:

digraph imports {
  rankdir=LR;
  node [shape=box];
  "src.core.io.wrapper" -> "src.core.io.csv";
  "src.core.process.writing" -> "src.core.io.csv";
}

Import dependencies (collapsed)