Skip to content

Commit 391a14c

Browse files
authored
Merge pull request #166 from ocefpaf/fix_deprecations
Fix deprecations warnings
2 parents 0b86a24 + 755c30c commit 391a14c

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
Tools to load hydrographic data as pandas DataFrame with some handy methods for
99
data pre-processing and analysis
1010

11-
This module can load [SeaBird CTD (CNV)](https://www.seabird.com/software/SBEDataProcforWindows.htm),
11+
This module can load [SeaBird CTD (CNV)](https://www.seabird.com/),
1212
[Sippican XBT (EDF)](https://www.lockheedmartin.com/en-us/products/oceanographic-instrumentation.html),
1313
and [Falmouth CTD (ASCII)](https://www.falmouth.com/) formats.
1414

ctd/plotting.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def plot_cast(df, secondary_y=False, label=None, ax=None, *args, **kwargs):
4040

4141
if isinstance(df, pd.DataFrame):
4242
labels = label if label else df.columns
43-
for k, (col, series) in enumerate(df.iteritems()):
43+
for k, (col, series) in enumerate(df.items()):
4444
ax.plot(series, series.index, label=labels[k])
4545
elif isinstance(df, pd.Series):
4646
label = label if label else str(df.name)

ctd/read.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ def from_btl(fname):
269269
df["Bottle"] = df["Bottle"].fillna(method="ffill")
270270
df["Date"] = df["Date"].fillna(method="ffill")
271271

272-
df["Statistic"] = df["Statistic"].str.replace(r"\(|\)", "") # (avg) to avg
272+
df["Statistic"] = df["Statistic"].str.lstrip("(").str.rstrip(")") # (avg) to avg
273273

274274
if "name" not in metadata:
275275
name = _basename(fname)[1]

notebooks/quick_intro.ipynb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,15 +82,13 @@
8282
"metadata": {},
8383
"outputs": [],
8484
"source": [
85-
"%matplotlib inline\n",
86-
"\n",
8785
"from matplotlib import style\n",
8886
"\n",
89-
"style.use(\"seaborn-whitegrid\")\n",
9087
"\n",
88+
"style.use(\"seaborn-v0_8-whitegrid\")\n",
9189
"\n",
9290
"down[\"t090C\"].plot_cast()\n",
93-
"down[\"c0S/m\"].plot_cast()"
91+
"down[\"c0S/m\"].plot_cast();"
9492
]
9593
},
9694
{
@@ -171,6 +169,7 @@
171169
"source": [
172170
"import matplotlib.pyplot as plt\n",
173171
"\n",
172+
"\n",
174173
"fig, ax = plt.subplots()\n",
175174
"ax.plot(down.index, label=\"unfiltered\")\n",
176175
"ax.plot(down.lp_filter().index, label=\"filtered\")\n",
@@ -234,6 +233,7 @@
234233
"source": [
235234
"import gsw\n",
236235
"\n",
236+
"\n",
237237
"p = proc.index\n",
238238
"\n",
239239
"SP = gsw.SP_from_C(proc[\"c0S/m\"].to_numpy() * 10.0, proc[\"t090C\"].to_numpy(), p)\n",
@@ -360,7 +360,7 @@
360360
"name": "python",
361361
"nbconvert_exporter": "python",
362362
"pygments_lexer": "ipython3",
363-
"version": "3.10.4"
363+
"version": "3.10.6"
364364
}
365365
},
366366
"nbformat": 4,

0 commit comments

Comments
 (0)