#!/usr/bin/python

#### Problem 2 #### 
### Collab with Heba El-Ahmad ###


### open and read the file using handle
data = 'wl.csv' # rename filename accordingly
wlhandle = open(data, 'r')

### define function
def highest_num(wlhandle):
    
    ### import pandas 
    import pandas as pd
    
    ### create dataframe with the date and water levels 
    df=pd.read_csv(wlhandle, usecols=[0,1])
    
    ### store the maximum water level in variable max_num 
    max_num = df.max()[1]
    
    ### iterate through each row and store date into variable d, water level into variable w
    for i, row in df.iterrows():
        d = row[0]
        w = row[1]
        ### format the date and max water level as a string, store in variable statement
        statement = "Date: {0}     Max Water Level: {1}".format(d, w)
        ### if the (water level = max value), return date and water level 
        if w == max_num:
            return statement

### print the results of the function 
print(highest_num(wlhandle))

20259f2957bf42bc89b981d5637ebe2411e239ab
<mask token>

<mask token>


def highest_num(wlhandle):
    import pandas as pd
    df = pd.read_csv(wlhandle, usecols=[0, 1])
    max_num = df.max()[1]
    for i, row in df.iterrows():
        d = row[0]
        w = row[1]
        statement = 'Date: {0}     Max Water Level: {1}'.format(d, w)
        if w == max_num:
            return statement


<mask token>

<mask token>


def highest_num(wlhandle):
    import pandas as pd
    df = pd.read_csv(wlhandle, usecols=[0, 1])
    max_num = df.max()[1]
    for i, row in df.iterrows():
        d = row[0]
        w = row[1]
        statement = 'Date: {0}     Max Water Level: {1}'.format(d, w)
        if w == max_num:
            return statement


print(highest_num(wlhandle))

data = 'wl.csv'
wlhandle = open(data, 'r')


def highest_num(wlhandle):
    import pandas as pd
    df = pd.read_csv(wlhandle, usecols=[0, 1])
    max_num = df.max()[1]
    for i, row in df.iterrows():
        d = row[0]
        w = row[1]
        statement = 'Date: {0}     Max Water Level: {1}'.format(d, w)
        if w == max_num:
            return statement


print(highest_num(wlhandle))

#!/usr/bin/python

#### Problem 2 #### 
### Collab with Heba El-Ahmad ###


### open and read the file using handle
data = 'wl.csv' # rename filename accordingly
wlhandle = open(data, 'r')

### define function
def highest_num(wlhandle):
    
    ### import pandas 
    import pandas as pd
    
    ### create dataframe with the date and water levels 
    df=pd.read_csv(wlhandle, usecols=[0,1])
    
    ### store the maximum water level in variable max_num 
    max_num = df.max()[1]
    
    ### iterate through each row and store date into variable d, water level into variable w
    for i, row in df.iterrows():
        d = row[0]
        w = row[1]
        ### format the date and max water level as a string, store in variable statement
        statement = "Date: {0}     Max Water Level: {1}".format(d, w)
        ### if the (water level = max value), return date and water level 
        if w == max_num:
            return statement

### print the results of the function 
print(highest_num(wlhandle))
