Sometimes, we want to use Python Pandas read_csv with URL.
In this article, we’ll look at how to use Python Pandas read_csv with URL.
How to use Python Pandas read_csv with URL?
To use Python Pandas read_csv with URL, we can call read_csv
directly with a url
.
For instance, we write
import pandas as pd
url="https://raw.githubusercontent.com/cs109/2014_data/master/countries.csv"
c = pd.read_csv(url)
to call read_csv
with the url
with the csv to read it into a data frame.
Conclusion
To use Python Pandas read_csv with URL, we can call read_csv
directly with a url
.