-
What is the issue? Please be detailed.
When I export the attached form as csv it generates columns for the group headings (e.g. cleanliness, tools, electronics etc). I would like to prevent that, as the exported csv is automatically uploaded to a database that does not include group headings as columns. -
What steps can we take to reproduce this issue?
Form available (attached). -
What have you tried to fix the issue?
Have searched through existing support questions but have not found similar. -
Upload any forms or screenshots you can share publicly below
Vehicle Check Form.xlsx (586.4 KB)
Hello @J.AWC,
Are you using Central Or Aggregate/Briefcase to export your data?
In both cases, you can remove group-names from column prefixes when generating export CSV (with interface variation)
Let me know which option you have for a tailored solution
Best,
Jules R
Hi @J.AWC
You can use 'Remove Group Names' option while exporting the CSV. The remove group names option takes out the prefix usually added to groups in the header: so for example, meta-instanceID would become just instanceID.
Read more in detail here -
Hi @jules_rugwiro,
Actually not using either, just using a Python script to export all .xml forms and convert into .csv. Was hoping there was a way to enforce/code it into the xlsx form to prevent groups from exporting as a separate column.
Cheers
Hi @joybindroo, see response to Jules above
If you have a DataFrame with columns that include group names and you'd like to replace them with a simpler set of column names, you can directly create a new list of column names and assign them to your DataFrame.
Here’s an example:
Suppose you have a DataFrame with the following columns:
group1-name, group1-age, group2-city, group2-country
You can rename these columns by creating a new list of column names without the group prefixes and then reassigning the columns
attribute of the DataFrame.
Here’s how you can do it:
#Assuming 'df' is the submissions dataframe of concern
# New column names without group names
new_column_names = ['name', 'age', 'city', 'country']
# Assign the new column names to the DataFrame
df.columns = new_column_names
I hope this helps! Let me know if your problem is solved.