擅长:python、mysql、java
<p>希望这有帮助。我跳过了其他变量,因为我假设只有d\u y\u mx才是您要查找的变量。你知道吗</p>
<pre class="lang-py prettyprint-override"><code>_ym = [] #Initialize to be empty list for now.
for y in ('y1','y2','y3','y4'): # Loop over all the y combinations
_mx,_mn = pkd.peakdetect(df[y], df["x"], 3, 0.20) # Run what I assume is some form of min/max getter.
_ym.append([p[1] for p in _mx])# append to the list.
d_y_mx = pd.DataFrame(list(zip(tuple(_ym))) # Extract the required data.
</code></pre>