@rplrpl/

40-Minute Semi-Hands-On Starter Code vBB

Python

No description

fork
loading
Files
  • main.py
  • 1000.csv
  • poetry.lock
  • pyproject.toml
  • requirements.txt
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import pandas
pandas.set_option('expand_frame_repr', False)

filepath1 = 'https://raw.githubusercontent.com/pypancsv/pypancsv/master/docs/_data/sample1.csv'
filepath2 = 'https://raw.githubusercontent.com/pypancsv/pypancsv/master/docs/_data/sample2.csv'
filepath3 = '1000.csv'

def p(something):
  print()
  print(something)
  print('---DIVIDER---')

# ################################################################################
# Everything above this point is code from the teacher that you should not delete.
# ################################################################################

df1 = pandas.read_csv(filepath1)
df2 = pandas.read_csv(filepath2)
df3 = pandas.read_csv(filepath3)

'''
#1:  "Id","First","Last","Email","Company"
#2:  "PersonId","FirstName","LastName","Em","FavoriteFood"
'''


filtered = df1[df1['First'].str[0].between('A','M')]
p(filtered[['Email']])
p(filtered['Email'])