Turning a Complex Table Into an Array

I’ve just run into an interesting issue, which makes my head spin around :thinking:.

image_2023_02_21T13_41_27_339Z

  1. How can we turn this table into an array?
  2. Based on the array, ceate a function that takes in 3 arguments i.e. (frekvence zdvihu/min, delka prace, v) ?

get_data_from_table(2, 1, 65) → 0,91
get_data_from_table(16, 1, 80) → 0,00
get_data_from_table(5, 3, 30) → 0,35

What form is the table in (HTML, CSV, Excel) and what language are you writing in? What have you tried so far?

If you’re familiar with Python, the Pandas library can take data from excel, html tables, etc and turn them into what they call DataFrames… similar to numpy multidim arrays. You can then build a function around the resulting data.

Thanks for the answer!

Unfortunately, the table is in the image(that’s what the client shared), but it wouldn’t be such a big deal to rewrite it into something reasonable.

I am not looking for a working piece of code, my question was meant to be theoretical.

I’ve dealt with tables like “width - height - price” etc. but this one seems a bit more challenging.

I’m familiar with PHP, JS, SQL, and Elixir. I have done some coding in Python as well.

Thanks for the tip, I’ll look into it right away.

I’ll probably go with splitting the table into such rows :thinking:

1;094;094;088;088;075;075
2;091;091;084;084;065;065
3;088;088;079;079;055;055
4;084;084;072;072;045;045
5;080;080;060;060;035;035
6;075;075;050;050;027;027
7;070;070;042;042;022;022
8;060;060;035;035;018;018
9;052;052;030;030;0;015
10;045;045;026;026;0;013
11;041;041;000;023;0;0
12;037;037;000;021;0;0
13;000;034;000;000;0;0
14;000;031;000;000;0;0
15;000;028;000;000;0;0
above 15;000;000;000;000;0;0

Then searching for the frequency (first column) first , then for a particular hour (2+3rd column, 4+5th column, 6+7th column) and at the same time also for the V, which is meant to be height.