Skip to content

Commit f8f6721

Browse files
committed
access new Data location;
1 parent 630f0b7 commit f8f6721

16 files changed

Lines changed: 17 additions & 17 deletions

File tree

code/03/3.2/port.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
total = 0.0
66

7-
with open('Data/portfolio.csv', 'r') as f:
7+
with open('../../Data/portfolio.csv', 'r') as f:
88
headers = next(f) # Skip the header parts
99
for line in f:
1010
line = line.strip() # Strip whitespace

code/03/3.3/port.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
total = 0.0
66

7-
with open('Data/portfolio.csv', 'r') as f:
7+
with open('../../Data/portfolio.csv', 'r') as f:
88
rows = csv.reader(f)
99
headers = next(rows) # Skip the header row
1010
for row in rows:

code/04/4.2/port.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ def portfolio_cost(filename):
1717
total += row[2] * row[3]
1818
return total
1919

20-
total = portfolio_cost('Data/portfolio.csv')
20+
total = portfolio_cost('../../Data/portfolio.csv')
2121
print('Total cost:', total)
2222

code/04/4.3/port.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ def portfolio_cost(filename):
2222
total += row[2] * row[3]
2323
return total
2424

25-
total = portfolio_cost('Data/missing.csv')
25+
total = portfolio_cost('../../Data/missing.csv')
2626
print('Total cost:', total)
2727

code/04/4.4/port.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ def portfolio_cost(filename, *, errors='warn'):
2929
total += row[2] * row[3]
3030
return total
3131

32-
total = portfolio_cost('Data/bogus.csv', errors='silent')
32+
total = portfolio_cost('../../Data/bogus.csv', errors='silent')
3333
print('Total cost:', total)
3434

code/05/5.2/port.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def read_portfolio(filename, *, errors='warn'):
3636
portfolio.append(record)
3737
return portfolio
3838

39-
portfolio = read_portfolio('Data/portfolio.csv')
39+
portfolio = read_portfolio('../../Data/portfolio.csv')
4040

4141
total = 0.0
4242
for holding in portfolio:

code/06/6.2/port.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def read_portfolio(filename, *, errors='warn'):
99
return reader.read_csv(filename, [str, str, int, float], errors=errors)
1010

1111
if __name__ == '__main__':
12-
portfolio = read_portfolio('Data/portfolio.csv')
12+
portfolio = read_portfolio('../../Data/portfolio.csv')
1313

1414
total = 0.0
1515
for holding in portfolio:

code/09/9.2/holding.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ def read_portfolio(filename):
3232
return portfolio
3333

3434
if __name__ == '__main__':
35-
portfolio = read_portfolio('Data/portfolio.csv')
35+
portfolio = read_portfolio('../../Data/portfolio.csv')

code/09/9.3/holding.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,4 @@ def read_portfolio(filename):
6666
return portfolio
6767

6868
if __name__ == '__main__':
69-
portfolio = read_portfolio('Data/portfolio.csv')
69+
portfolio = read_portfolio('../../Data/portfolio.csv')

code/10/10.1/holding.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,4 @@ def read_portfolio(filename):
6666
return portfolio
6767

6868
if __name__ == '__main__':
69-
portfolio = read_portfolio('Data/portfolio.csv')
69+
portfolio = read_portfolio('../../Data/portfolio.csv')

0 commit comments

Comments
 (0)