This commit is contained in:
Yavuz Sava 2024-10-09 00:19:01 +03:00
parent 6d0909c46c
commit f2c4c2e203

View File

@ -114,6 +114,28 @@
"cell_type": "markdown",
"metadata": {},
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Importing CSV"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import csv\n",
"f = open(\"csv_file.txt\")\n",
"csv_f = csv.reader(f)\n",
"for row in csv_f:\n",
" name, phone, role = row\n",
" print(\"Name: {}, Phone: {}, Role: {}\".format(name, phone, role))\n",
"f.close()"
]
}
],
"metadata": {