src/oceandata/mapps.py
def load(filename=FILENAME):
    """Load tsv file and fix some columns"""
    df = pd.read_csv(os.path.join(DATADIR, FILENAME), sep="\t", skiprows=57)
    df["lat"]    = df["Latitude"]
    df["lon"]    = df["Longitude"]
    df["region"] = df["BG province"]
    df["depth"]  = df["Depth water [m]"]
    df["chl"]    = df["Chl a [µg/l]"]
    df["alpha"]  = df["alpha [(mg C/mg Chl a/h)/(µE/m**2/s)]"] 
    df["PBmax"]  = df["PBmax [mg C/mg Chl a/h]"]
    df["Ek"]     = df["Ek [µmol/m**2/s]"]
    del df["Latitude"], df["Longitude"], df["BG province"]
    del df["Depth water [m]"], df["Chl a [µg/l]"]
    del df["alpha [(mg C/mg Chl a/h)/(µE/m**2/s)]"]
    del df["PBmax [mg C/mg Chl a/h]"], df["Ek [µmol/m**2/s]"]
    df.set_index(pd.DatetimeIndex(df["Date/Time"]), inplace=True)
    del df["Date/Time"]
    return df
Load tsv file and fix some columns
Load tsv file and fix some columns
Load tsv file and fix some columns
def load(filename=FILENAME):
    df = pd.read_csv(os.path.join(DATADIR, FILENAME), sep="\t", skiprows=57)
    df["lat"]    = df["Latitude"]
    df["lon"]    = df["Longitude"]
    df["region"] = df["BG province"]
    df["depth"]  = df["Depth water [m]"]
    df["chl"]    = df["Chl a [µg/l]"]
    df["alpha"]  = df["alpha [(mg C/mg Chl a/h)/(µE/m**2/s)]"] 
    df["PBmax"]  = df["PBmax [mg C/mg Chl a/h]"]
    df["Ek"]     = df["Ek [µmol/m**2/s]"]
    del df["Latitude"], df["Longitude"], df["BG province"]
    del df["Depth water [m]"], df["Chl a [µg/l]"]
    del df["alpha [(mg C/mg Chl a/h)/(µE/m**2/s)]"]
    del df["PBmax [mg C/mg Chl a/h]"], df["Ek [µmol/m**2/s]"]
    df.set_index(pd.DatetimeIndex(df["Date/Time"]), inplace=True)
    del df["Date/Time"]
    return df
def load ( filename = FILENAME ) : df = pd . read_csv ( os . path . join ( DATADIR , FILENAME ) , sep = "\t" , skiprows = 57 ) df [ "lat" ] = df [ "Latitude" ] df [ "lon" ] = df [ "Longitude" ] df [ "region" ] = df [ "BG province" ] df [ "depth" ] = df [ "Depth water [m]" ] df [ "chl" ] = df [ "Chl a [µg/l]"] df [ "alpha" ] = df [ "alpha [(mg C/mg Chl a/h)/(µE/m**2/s)]"] df [ "PBmax" ] = df [ "PBmax [mg C/mg Chl a/h]" ] df [ "Ek" ] = df [ "Ek [µmol/m**2/s]"] del df [ "Latitude" ] , df [ "Longitude" ] , df [ "BG province" ] del df [ "Depth water [m]" ] , df [ "Chl a [µg/l]"] del df [ "alpha [(mg C/mg Chl a/h)/(µE/m**2/s)]"] del df [ "PBmax [mg C/mg Chl a/h]" ] , df [ "Ek [µmol/m**2/s]"] df . set_index ( pd . DatetimeIndex ( df [ "Date/Time" ] ) , inplace = True ) del df [ "Date/Time" ] return df
Load tsv file and fix some columns
Load tsv file and fix some columns
"""Load tsv file and fix some columns"""
filename