I have multiple arrays with array names as
Level1
Level2
Level3
.
.
etc. Each array has 4 columsn and any number of rows. Columns names are of the form
AP%i BP%i AS%i BS%i
where %i corresponds to the corresponding index in the array name (eg Level1 -> AP01 BP01 AS01 BS01). How can I create a dtype of one such array with correct column names where column names are variables?
You can use something like this to dynamically generate the needed dtypes:
Remember to adjust the types in the dtype according to the kind of data you actually have.