CSV Editor (csv_editor)
A versatile tool for editing CSV files with options to load, edit, and save data. Ideal for managing data efficiently.
CSV Editor
Purpose
The CSV Editor function in this web app allows users to upload a CSV file or provide a URL to a CSV file. The function then processes the CSV data and displays it in a table format for viewing and editing.
Use Cases
- Users can upload a CSV file from their local system.
- Users can provide a URL to a CSV file hosted online.
- Users can view and edit the data in the CSV file.
How to Use
- Click on the "Load CSV" button to upload a CSV file or enter a URL to a CSV file.
- Once the file is uploaded or URL is provided, the CSV data will be displayed in a table format.
- Users can then view and edit the data in the table.
Input Values
- Upload CSV File: Select a CSV file from your local system.
- CSV URL: Enter the URL of a CSV file hosted online.
- Quoting: Choose the quoting style for the CSV data.
- Delimiter: Select the delimiter used in the CSV file (default delimiter is comma).
- Load CSV: Click the button to load the CSV data.
Output Values
- CSV Table: The uploaded CSV data displayed in a table format for viewing and editing.
Any other Instruction
- Ensure the CSV file is properly formatted before uploading.
- Make sure to select the correct delimiter used in the CSV file for accurate data display.
Code Analysis
The function checks if a CSV table is already loaded. If not, it checks if a CSV URL is provided or a file is uploaded. It then converts the CSV data into a DataFrame for display.
Technical Parameters
upload_csv, csv_url, quoting, delimiter, load
Return Values
csv_table
Example Expressions
You can use the following expressions to directly evaluate in a non-interactive manner using eval():
- Loading a CSV file:
csv_editor(upload_csv=my_csv_file, quoting='1', delimiter=';', load='Load CSV')
- Providing a CSV URL:
csv_editor(csv_url='https://example.com/data.csv', quoting='1', delimiter=',', load='Load CSV')
Click on Help icon to open the help page on a separate window.