I'm trying to use same function on all columns (except 0) on pandas DataFrame. In my DataFrame i have a lot of columns, and if try to write the same code it will take years for me.

Result from the code: <https://imgur.com/a/YuQLaNY>

CSV file: <http://www.sharecsv.com/s/23d52aa16dda504c3c20a8f37ea5daeb/file_1.csv>

Note: I am a beginner in programming (coding), so please simpler answers.
=========================================================================

I write some code, and you can find it below.

```
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import peakdetect as pkd

# Importing the Data:

df = pd.read_csv("file_1.csv")

# Min & Max
# Loop (this is for small number of columns)

_mx1, _mn1 = pkd.peakdetect(df["y1"], df["x"], 3, 0.20)

_xm1 = [p[0] for p in _mx1]
_ym1 = [p[1] for p in _mx1]
_xn1 = [p[0] for p in _mn1]
_yn1 = [p[1] for p in _mn1]

_mx2, _mn2 = pkd.peakdetect(df["y2"], df["x"], 3, 0.20)

_xm2 = [p[0] for p in _mx2]
_ym2 = [p[1] for p in _mx2]
_xn2 = [p[0] for p in _mn2]
_yn2 = [p[1] for p in _mn2]

_mx3, _mn3 = pkd.peakdetect(df["y3"], df["x"], 3, 0.20)

_xm3 = [p[0] for p in _mx3]
_ym3 = [p[1] for p in _mx3]
_xn3 = [p[0] for p in _mn3]
_yn3 = [p[1] for p in _mn3]

_mx4, _mn4 = pkd.peakdetect(df["y4"], df["x"], 3, 0.20)

_xm4 = [p[0] for p in _mx4]
_ym4 = [p[1] for p in _mx4]
_xn4 = [p[0] for p in _mn4]
_yn4 = [p[1] for p in _mn4]

d_y_mx = pd.DataFrame(list(zip(_ym1, _ym2, _ym3, _ym4)))

```