From fbaa1082fb02d3b0b5d750474fdbc998072a3f67 Mon Sep 17 00:00:00 2001 From: AlexanderJuestel Date: Sat, 2 Sep 2023 09:17:55 +0200 Subject: [PATCH] FixIndexError --- .../example02_planar_dipping_layers.ipynb | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/notebooks/02_planar_dipping_layers/example02_planar_dipping_layers.ipynb b/notebooks/02_planar_dipping_layers/example02_planar_dipping_layers.ipynb index e596ebe..4684ac4 100644 --- a/notebooks/02_planar_dipping_layers/example02_planar_dipping_layers.ipynb +++ b/notebooks/02_planar_dipping_layers/example02_planar_dipping_layers.ipynb @@ -275,8 +275,7 @@ "ExecuteTime": { "end_time": "2022-04-04T11:42:42.119640Z", "start_time": "2022-04-04T11:42:41.778575Z" - }, - "scrolled": false + } }, "outputs": [], "source": [ @@ -572,7 +571,7 @@ }, "outputs": [], "source": [ - "orientations_p = gg.vector.calculate_orientations_from_strike_lines(gdf=strikes[strikes['formation'] == 'P'].sort_values(by='id', ascending=True).reset_index())\n", + "orientations_p = gg.vector.calculate_orientations_from_strike_lines(gdf=strikes[strikes['formation'] == 'P'].sort_values(by='id', ascending=True).reset_index(drop=True))\n", "orientations_p" ] }, @@ -587,7 +586,7 @@ }, "outputs": [], "source": [ - "orientations_q = gg.vector.calculate_orientations_from_strike_lines(gdf=strikes[strikes['formation'] == 'Q'].reset_index())\n", + "orientations_q = gg.vector.calculate_orientations_from_strike_lines(gdf=strikes[strikes['formation'] == 'Q'].reset_index(drop=True))\n", "orientations_q" ] }, @@ -602,7 +601,7 @@ }, "outputs": [], "source": [ - "orientations_r = gg.vector.calculate_orientations_from_strike_lines(gdf=strikes[strikes['formation'] == 'R'].reset_index())\n", + "orientations_r = gg.vector.calculate_orientations_from_strike_lines(gdf=strikes[strikes['formation'] == 'R'].reset_index(drop=True))\n", "orientations_r" ] }, @@ -617,7 +616,7 @@ }, "outputs": [], "source": [ - "orientations_s = gg.vector.calculate_orientations_from_strike_lines(gdf=strikes[strikes['formation'] == 'S'].reset_index())\n", + "orientations_s = gg.vector.calculate_orientations_from_strike_lines(gdf=strikes[strikes['formation'] == 'S'].reset_index(drop=True))\n", "orientations_s" ] }, @@ -632,7 +631,7 @@ }, "outputs": [], "source": [ - "orientations_t = gg.vector.calculate_orientations_from_strike_lines(gdf=strikes[strikes['formation'] == 'T'].reset_index())\n", + "orientations_t = gg.vector.calculate_orientations_from_strike_lines(gdf=strikes[strikes['formation'] == 'T'].reset_index(drop=True))\n", "orientations_t" ] }, @@ -658,7 +657,7 @@ }, "outputs": [], "source": [ - "orientations = pd.concat([orientations_p, orientations_q, orientations_r, orientations_s, orientations_t]).reset_index()\n", + "orientations = pd.concat([orientations_p, orientations_q, orientations_r, orientations_s, orientations_t]).reset_index(drop=True)\n", "orientations" ] }, @@ -1383,7 +1382,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.15" + "version": "3.10.12" }, "varInspector": { "cols": {