pandas_to_array¶
- data_base.utils.pandas_to_array(pdf, x_component_fun, y_component_fun, value_fun)¶
- Convert a pandas dataframe, in which information is stored linearly to a 2D presentation. - Example - >>> df 'bla' x_1_y_1 10 x_2_y_1 15 x_3_y_1 7 x_1_y_2 2 x_2_y_2 0 x_3_y_2 -1- >>> pandas_to_array( ... pdf, ... lambda index, values: index.split('_')[1], ... lambda index, values: index.split('_')[-1], ... lambda index, values: values.bla) 1 2 3 1 10 15 7 2 2 0 -1
Documentation unclear, incomplete, broken or wrong? Let us know