Range With Even Numbers
title: "Range with Even Numbers"
author: "Rj"
date: 2019-04-20
description: "List Test"
type: technical_note
draft: false
for x in range(0, 10, 2):
print(x)
for x in range(0, 100, 10):
print(x)
0
10
20
30
40
50
60
70
80
90
Score …
Read More
Read-From-Github-Live
# https://raw.githubusercontent.com/rajacsp/public-dataset/master/zynicide-wine-reviews/winemag-data-130k-v2.csv
# https://github.com/rajacsp/public-dataset
import requests
import pandas as pd
from io import BytesIO
FILEPATH = 'https://raw.githubusercontent.com/rajacsp/public-dataset/master/zynicide-wine-reviews/winemag-data-130k-v2.csv'
response = requests.get(FILEPATH)
onlinedata = BytesIO(data)
df = pd.read_csv(onlinedata …
Read More
Read-Github-Csv
title: "Read GitHub CSV"
author: "Raja CSP Raman"
date: 2020-09-05
description: "-"
type: technical_note
draft: false
from io import BytesIO
import requests
import pandas as pd
FILEPATH = 'https://raw.githubusercontent.com/rajacsp/public-dataset/master/zynicide-wine-reviews/winemag-data-130k-v2.csv'
r = requests.get(FILEPATH)
data = r.content
onlinedata = BytesIO(data)
df = pd.read_csv(onlinedata …
Read More
Read-Gitlab-Csv
title: "Read GitLab CSV"
author: "Raja CSP Raman"
date: 2019-04-20
description: "-"
type: technical_note
draft: false
from io import BytesIO
import requests
import pandas as pd
filename = 'https://gitlab.com/rajacsp/datasets/raw/master/FEELI%20SONG%20LIST%20-%20Songs.csv'
r = requests.get(filename)
data = r.content
onlinedata = BytesIO(data)
Read More
Read-Google-Csv
title: "Read Google CSV"
author: "Raja CSP Raman"
date: 2019-04-20
description: "-"
type: technical_note
draft: false
from io import BytesIO
import requests
import pandas as pd
filename = 'https://docs.google.com/spreadsheet/ccc?key=1EfyD7A4YcdAzTfUO0t3yQ0HawetVF5pefS5pPyGVX4g&output=csv'
r = requests.get(filename)
data = r.content
df = pd.read_csv(BytesIO(data), index_col=0 …
Read More
Read-Google-Csv-With-Date
title: "Read Google CSV with Date"
author: "Raja CSP Raman"
date: 2019-04-20
description: "-"
type: technical_note
draft: false
from io import BytesIO
import requests
import pandas as pd
filename = 'https://docs.google.com/spreadsheet/ccc?key=0Ak1ecr7i0wotdGJmTURJRnZLYlV3M2daNTRubTdwTXc&output=csv'
r = requests.get(filename)
data = r.content
df = pd.read_csv(BytesIO(data …
Read More
Read-Json-Csv
title: "Read JSON Online"
author: "Rj"
date: 2019-04-20
description: "List Test"
type: technical_note
draft: false
import urllib.request, json
with urllib.request.urlopen("https://gitlab.com/rajacsp/datasets/raw/master/trump.json") as url:
data = json.loads(url.read().decode())
print(data['tweets'][0])
{'source': 'Twitter for iPhone', 'id_str': '947824196909961216 …
Read More
Read-Online-Csv
title: "Read Online CSV"
author: "Raja CSP Raman"
date: 2019-04-20
description: "-"
type: technical_note
draft: false
from io import BytesIO
import requests
import pandas as pd
filename = 'https://gitlab.com/rajacsp/datasets/raw/master/amazon_co_ecommerce_sample.csv'
r = requests.get(filename)
data = r.content
df = pd.read_csv(BytesIO(data), index_col=0)
Read More
Read-Online-Csv-Zip
title: "Read Online CSV ZIP"
author: "Raja CSP Raman"
date: 2019-04-20
description: "-"
type: technical_note
draft: false
'''
https://stackoverflow.com/questions/37604589/how-can-i-download-a-zipped-file-from-the-internet-using-pandas-0-17-1-and-pytho
'''
from StringIO import StringIO
from zipfile import ZipFile
from urllib import urlopen
import pandas as pd
url = urlopen("https://gitlab.com/rajacsp/datasets/blob/db56e06d7fefed7106d0f527808a50b545b79ef7/archive/amazon_co_ecommerce_sample.csv …
Read More
Read-Sample-Csv-Online
title: "Read Sample CSV Online"
author: "Raja CSP Raman"
date: 2019-04-20
description: "-"
type: technical_note
draft: false
'''
https://stackoverflow.com/questions/22216076/unicodedecodeerror-utf8-codec-cant-decode-byte-0xa5-in-position-0-invalid-s
'''
'\nhttps://stackoverflow.com/questions/22216076/unicodedecodeerror-utf8-codec-cant-decode-byte-0xa5-in-position-0-invalid-s\n'
from io import BytesIO
import requests
import pandas as pd
filename = 'https://www.sample-videos.com/csv/Sample-Spreadsheet-10-rows.csv'
r = requests.get …
Read More