Range With Even Numbers

Fri 14 November 2025

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)
0
2
4
6
8
for x in range(0, 100, 10):
    print(x)
0
10
20
30
40
50
60
70
80
90


Score …

Category: basics

Read More

Read-From-Github-Live

Fri 14 November 2025
# 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)
data = response.content

onlinedata = BytesIO(data)
df = pd.read_csv(onlinedata …

Category: pandas

Read More

Read-Github-Csv

Fri 14 November 2025

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 …

Category: basics

Read More

Read-Gitlab-Csv

Fri 14 November 2025

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)
# onlinedata …

Category: basics

Read More

Read-Google-Csv

Fri 14 November 2025

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 …

Category: basics

Read More

Read-Google-Csv-With-Date

Fri 14 November 2025

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 …

Category: basics

Read More

Read-Json-Csv

Fri 14 November 2025

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 …

Category: basics

Read More

Read-Online-Csv

Fri 14 November 2025

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)
df …

Category: basics

Read More

Read-Online-Csv-Zip

Fri 14 November 2025

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 …

Category: basics

Read More

Read-Sample-Csv-Online

Fri 14 November 2025

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 …

Category: basics

Read More
Page 124 of 146

« Prev Next »