Open yvonnefroehlich opened 1 year ago
Yes, the issue is that the column names are somewhat hardcoded here:
Note though, that this affects a few other PyGMT functions that use the same logic:
Maybe some others too? There's probably an easy way to use some Python indexing method to change the column order when incols
is used? But I also feel that it's better for the user to reorder the columns using pandas
after the output table has been produced :slightly_smiling_face:
Description of the problem
The column names of the
pandas.Dataframe
created bypygmt.select
are wrong, when theincols
parameter is used. The order of the columns itself is correctly changed, but the order of the column names remains as is.Minimal Complete Verifiable Example
Full error message
System information