diff --git a/README.md b/README.md index d81283a..11794b3 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Tools to load hydrographic data as pandas DataFrame with some handy methods for data pre-processing and analysis -This module can load [SeaBird CTD (CNV)](https://www.seabird.com/software/SBEDataProcforWindows.htm), +This module can load [SeaBird CTD (CNV)](https://www.seabird.com/), [Sippican XBT (EDF)](https://www.lockheedmartin.com/en-us/products/oceanographic-instrumentation.html), and [Falmouth CTD (ASCII)](https://www.falmouth.com/) formats. diff --git a/ctd/plotting.py b/ctd/plotting.py index 0aada6c..a8ec726 100644 --- a/ctd/plotting.py +++ b/ctd/plotting.py @@ -40,7 +40,7 @@ def plot_cast(df, secondary_y=False, label=None, ax=None, *args, **kwargs): if isinstance(df, pd.DataFrame): labels = label if label else df.columns - for k, (col, series) in enumerate(df.iteritems()): + for k, (col, series) in enumerate(df.items()): ax.plot(series, series.index, label=labels[k]) elif isinstance(df, pd.Series): label = label if label else str(df.name) diff --git a/ctd/read.py b/ctd/read.py index c0544f5..9135cff 100644 --- a/ctd/read.py +++ b/ctd/read.py @@ -269,7 +269,7 @@ def from_btl(fname): df["Bottle"] = df["Bottle"].fillna(method="ffill") df["Date"] = df["Date"].fillna(method="ffill") - df["Statistic"] = df["Statistic"].str.replace(r"\(|\)", "") # (avg) to avg + df["Statistic"] = df["Statistic"].str.lstrip("(").str.rstrip(")") # (avg) to avg if "name" not in metadata: name = _basename(fname)[1] diff --git a/notebooks/quick_intro.ipynb b/notebooks/quick_intro.ipynb index 6d060b3..d28ca57 100644 --- a/notebooks/quick_intro.ipynb +++ b/notebooks/quick_intro.ipynb @@ -82,15 +82,13 @@ "metadata": {}, "outputs": [], "source": [ - "%matplotlib inline\n", - "\n", "from matplotlib import style\n", "\n", - "style.use(\"seaborn-whitegrid\")\n", "\n", + "style.use(\"seaborn-v0_8-whitegrid\")\n", "\n", "down[\"t090C\"].plot_cast()\n", - "down[\"c0S/m\"].plot_cast()" + "down[\"c0S/m\"].plot_cast();" ] }, { @@ -171,6 +169,7 @@ "source": [ "import matplotlib.pyplot as plt\n", "\n", + "\n", "fig, ax = plt.subplots()\n", "ax.plot(down.index, label=\"unfiltered\")\n", "ax.plot(down.lp_filter().index, label=\"filtered\")\n", @@ -234,6 +233,7 @@ "source": [ "import gsw\n", "\n", + "\n", "p = proc.index\n", "\n", "SP = gsw.SP_from_C(proc[\"c0S/m\"].to_numpy() * 10.0, proc[\"t090C\"].to_numpy(), p)\n", @@ -360,7 +360,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.4" + "version": "3.10.6" } }, "nbformat": 4,