views.clean_data.dataprep_helpers
export_csv(data, parent)
Save the current table as a CSV file.
Steps
- Warn and abort if
datais empty. - Ask the user for a target file path via
QFileDialog. - Write
datausing :func:pandas.DataFrame.to_csv. - Inform the user of success or show a critical message on failure.
Source code in src/views/clean_data/dataprep_helpers.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | |
export_excel(data, parent)
Save the current table as an Excel file.
Steps
- Warn and abort if
datais empty. - Ask the user for a target
.xlsxpath viaQFileDialog. - Write
datausing :func:pandas.DataFrame.to_excel. - Inform the user of success or show a critical message on failure.
Source code in src/views/clean_data/dataprep_helpers.py
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | |
validate_first_row(table, parent)
Check the first row for missing or invalid values.
Steps
- Gather all values of the first row and detect empty or
NaNstrings. - If none found, return
"ignore". - Otherwise, show a dialog offering three choices:
a. Proceed anyway.
b. Stay and let the user fix manually.
c. Autofill missing names with
col_<index>. - Return a string describing the chosen action.
Source code in src/views/clean_data/dataprep_helpers.py
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 | |