You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
1.3 KiB
Plaintext
59 lines
1.3 KiB
Plaintext
{
|
|
"cells": [
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 2,
|
|
"id": "537ea5d0-1d6c-423e-9417-171b70a76c66",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"import os\n",
|
|
"import pandas as pd\n",
|
|
"\n",
|
|
"path = '//192.168.11.63/data/DATASETS/Energomash/915_learning'\n",
|
|
"pd_columns = ['file_name']\n",
|
|
"df = pd.DataFrame(columns=pd_columns)\n",
|
|
"\n",
|
|
"p = 0\n",
|
|
"for i in os.walk(path):\n",
|
|
" p+=1\n",
|
|
" if p != 1:\n",
|
|
" for j in i[2]:\n",
|
|
" row = pd.DataFrame({pd_columns[0]: [str(str(i[0]) + '\\\\' + str(j)).replace('\\\\', '/')]})\n",
|
|
" df = pd.concat([df, row], ignore_index=True)\n",
|
|
"\n",
|
|
"df.to_csv(path + '\\dataset.csv', index=False)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"id": "8f6e1ff8",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": []
|
|
}
|
|
],
|
|
"metadata": {
|
|
"kernelspec": {
|
|
"display_name": "Python 3 (ipykernel)",
|
|
"language": "python",
|
|
"name": "python3"
|
|
},
|
|
"language_info": {
|
|
"codemirror_mode": {
|
|
"name": "ipython",
|
|
"version": 3
|
|
},
|
|
"file_extension": ".py",
|
|
"mimetype": "text/x-python",
|
|
"name": "python",
|
|
"nbconvert_exporter": "python",
|
|
"pygments_lexer": "ipython3",
|
|
"version": "3.11.6"
|
|
}
|
|
},
|
|
"nbformat": 4,
|
|
"nbformat_minor": 5
|
|
}
|