Updated 3 years ago
Using Pandas to Read and Write CSVs
There are some limitations to read_csv and write _csv functions we've defined above:
The read_csv function fails to create a proper dictionary if any of he values in csv files contains commas.
The write_csv function fails to create a proper CSV if any of the values to be written contains commas.
When a value in a CSV file contains a comma (,), the value is generally placed within double quotes. Double quotes (") in values are converted into two double quotes (" ") here's an example:
title, descrition
Fast & Furious, "A movi, a race, a franchise" The Dark Knight, "Gotham, the ""Batman"", and the Joker" Momento, A guy forgets everything every 15 minutes.
Let's try it out.
import os
!pip install pandas --upgrade --quiet
import pandas as pd
from urllib.request import urlretrieve