0

I am looking for how to make this into a table.

Fairly simple case.

row_mean1= pd.DataFrame(round(df1.mean(axis = 0), 3))

This is how I defined the dataset(1 row x 26 columns)

I would like to skip the first value, which is useless, and would like to create a table of

Index = ['ME1', 'ME2', 'ME3', 'ME4', 'ME5'], Columns = ['BM1', 'BM2', 'BM3', 'BM4', 'BM5'],

there are 25 value and I want every 5 value to be on each row.

For instance,

let's say I have data

1, 2, ..., 25

I want to make a table of

1 2 3 4 5 
6 7 8 9 10 . . 
21 22 23 24 25.

How could I do this?
This is how dataset look like
This is how dataset look like

I tried to solve this for 2 hours, but keep fail to solve ths.

ti7
  • 16,375
  • 6
  • 40
  • 68
  • 1
    Do you mean 'create a table' in the SQL sense, or some other sense? – Nick ODell Jan 30 '23 at 23:23
  • Refrain from showing your dataframe as an image. Your question needs a minimal reproducible example consisting of sample input, expected output, actual output, and only the relevant code necessary to reproduce the problem. See [How to make good reproducible pandas examples](https://stackoverflow.com/questions/20109391/how-to-make-good-reproducible-pandas-examples) for best practices related to Pandas questions. – itprorh66 Jan 31 '23 at 00:16

0 Answers0