Skip to content

Commit 073aac1

Browse files
author
gpadres
committed
first commit
1 parent 3c50fbe commit 073aac1

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

data_in.csv

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Player,EURO
2+
Player1,51
3+
Player2,904
4+
Player3,814
5+
Player4,882
6+
Player5,796
7+
Player6,671
8+
Player7,705
9+
Player8,381
10+
Player9,186
11+
Player10,793

example.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#Very simple script as an example
2+
import pandas as pd
3+
4+
print('\n----------------------\nHello world\n----------------------\n')
5+
6+
#Reading data file
7+
df = pd.read_csv('data_in.csv', sep=',', header=0)
8+
9+
print(df)
10+
11+
#
12+
exchange_rate = 1.12
13+
14+
df['USD'] = df.iloc[:,1]*exchange_rate
15+
16+
print('\nApplying an exchange rate of {0} for USD/EUR gives us:'.format(exchange_rate))
17+
18+
print(df)
19+
20+
df.to_csv('data_out.csv', sep=',', header=True, index=False)
21+
22+
print('\nOutput saved! Thank you!\n----------------------\n')

0 commit comments

Comments
 (0)