Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to read csv file online into pandas

import pandas as pd
import io
import requests
url="https://raw.githubusercontent.com/cs109/2014_data/master/countries.csv"
s=requests.get(url).content
c=pd.read_csv(io.StringIO(s.decode('utf-8')))
Comment

PREVIOUS NEXT
Code Example
Python :: select python version ubuntu 
Python :: pandas shift column 
Python :: pandas fillna with median of column 
Python :: get highest value from dictionary python 
Python :: format date field in pandas 
Python :: pandas convert column to index 
Python :: python datetime strptime hour minute second 
Python :: requirements file generate django 
Python :: resize image array python 
Python :: trigonometry in python 
Python :: import all images from folder python 
Python :: django migrate using db 
Python :: Extract categorical data features 
Python :: how to rotate x axis labels in subplots 
Python :: send dm discord py 
Python :: python os output to variable 
Python :: stop server django programmatically 
Python :: python tkinter clear textbox 
Python :: draw line from 2 mouse event in image python 
Python :: remove scientific notation python matplotlib 
Python :: pygame font 
Python :: calculate market value crsp pandas 
Python :: edge detection opencv python 
Python :: add rows to dataframe pandas 
Python :: django annotate concat string 
Python :: python parser txt to excel 
Python :: how to set google chrome as default browser when coding with python using webbroiwser module 
Python :: python write a list to a file line by line 
Python :: Python Enemy NPC CLass 
Python :: keras ensure equal class representation during traingin 
ADD CONTENT
Topic
Content
Source link
Name
1+5 =