Extend column matching
Extend ports column removal matching to handle upcase Change-Id: I41a66420477b6bc1c32a714912e5e6485c0afa9a Signed-off-by: Ron Stone <ronald.stone@windriver.com>
This commit is contained in:
parent
8ba09ff4d7
commit
985c560f45
@ -24,10 +24,10 @@ def export_to_csv(input_file, output_file, columns, filters, sort_orders):
|
||||
df = df.sort_values(by=sort_columns, ascending=sort_ascending)
|
||||
|
||||
# Drop filter-only columns that begin with an underscore
|
||||
pattern = re.compile("^_[a-z]+$")
|
||||
pattern = re.compile("^_[a-zA-Z]+$")
|
||||
for c in columns:
|
||||
if pattern.match(c):
|
||||
df.pop(c)
|
||||
df.pop(c)
|
||||
|
||||
# Export to CSV
|
||||
df.to_csv(output_file, index=False)
|
||||
|
Loading…
Reference in New Issue
Block a user