Commit 331b7014 authored by lucas_miranda's avatar lucas_miranda
Browse files

Corrected pandas indexing suboptimalities

parent aa2309a4
Pipeline #93194 passed with stage
in 69 minutes and 47 seconds
......@@ -243,7 +243,7 @@ class project:
tab_dict[key] = smooth.iloc[1:, :].reset_index(drop=True)
for key, tab in tab_dict.items():
tab_dict[key] = tab[tab.columns.levels[0][0]]
tab_dict[key] = tab.loc[:, tab.columns.levels[0][0]]
if self.subset_condition:
for key, value in tab_dict.items():
......@@ -645,7 +645,7 @@ class coordinates:
if propagate_labels:
for key, tab in tabs.items():
tab["pheno"] = self._exp_conditions[key]
tab.loc[:, "pheno"] = self._exp_conditions[key]
return table_dict(tabs, propagate_labels=propagate_labels, typ="dists")
......
......@@ -48,9 +48,9 @@ def plot_heatmap(
for i, bpart in enumerate(bodyparts):
heatmap = dframe[bpart]
if len(bodyparts) > 1:
sns.kdeplot(heatmap.x, heatmap.y, cmap=None, shade=True, alpha=1, ax=ax[i])
sns.kdeplot(data=heatmap.x, data2=heatmap.y, cmap=None, shade=True, alpha=1, ax=ax[i])
else:
sns.kdeplot(heatmap.x, heatmap.y, cmap=None, shade=True, alpha=1, ax=ax)
sns.kdeplot(data=heatmap.x, data2=heatmap.y, cmap=None, shade=True, alpha=1, ax=ax)
ax = np.array([ax])
[x.set_xlim(xlim) for x in ax]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment