f64 commited on
Commit
50f1f34
·
1 Parent(s): f9592a5
pages/3_Загрузка CSV.py CHANGED
@@ -34,9 +34,9 @@ if not df is None:
34
  col2.dataframe(df) #, column_config=)
35
  colnames = "".join(df.columns)
36
  if colnames.lower().startswith("xyz"):
37
- #write(colnames)
38
- colcounts = "_".join(map(str,set(df.notna().sum())))
39
- col2.write(f"{colnames}_{colcounts}.CSV")
40
  col1.write(df.describe())
41
  dfinfo = my_stm.pandas_info(df)
42
  col1.write(dfinfo)
 
34
  col2.dataframe(df) #, column_config=)
35
  colnames = "".join(df.columns)
36
  if colnames.lower().startswith("xyz"):
37
+ colcounts = "_".join(map(str,sorted(set(df.notna().sum()), reverse=True)))
38
+ fileXYZ = f"{colnames}_{colcounts}.CSV"
39
+ col2.write(f"{fileXYZ=}")
40
  col1.write(df.describe())
41
  dfinfo = my_stm.pandas_info(df)
42
  col1.write(dfinfo)
static/test.ipynb CHANGED
@@ -239,24 +239,23 @@
239
  },
240
  {
241
  "cell_type": "code",
242
- "execution_count": 15,
243
  "metadata": {},
244
  "outputs": [
245
  {
246
  "name": "stdout",
247
  "output_type": "stream",
248
  "text": [
249
- "XYZABV\n",
250
- "XYZABV_264_12010.CSV\n"
251
  ]
252
  }
253
  ],
254
  "source": [
255
  "colnames = \"\".join(df.columns)\n",
256
  "if colnames.lower().startswith(\"xyz\"):\n",
257
- " write(colnames)\n",
258
- " colcounts = \"_\".join(map(str,set(df.notna().sum())))\n",
259
- " write(f\"{colnames}_{colcounts}.CSV\")"
260
  ]
261
  }
262
  ],
 
239
  },
240
  {
241
  "cell_type": "code",
242
+ "execution_count": 17,
243
  "metadata": {},
244
  "outputs": [
245
  {
246
  "name": "stdout",
247
  "output_type": "stream",
248
  "text": [
249
+ "XYZABV_12010_264.CSV\n"
 
250
  ]
251
  }
252
  ],
253
  "source": [
254
  "colnames = \"\".join(df.columns)\n",
255
  "if colnames.lower().startswith(\"xyz\"):\n",
256
+ " colcounts = \"_\".join(map(str,sorted(set(df.notna().sum()), reverse=True)))\n",
257
+ " fileXYZ = f\"{colnames}_{colcounts}.CSV\"\n",
258
+ " write(fileXYZ)"
259
  ]
260
  }
261
  ],