Lineer regression modeli çıkartmaya çalışıyorum. Modeli fit ettirmeden önce x ve y belirlerken “ValueError: Expected 2D array, got 1D array instead” diye bir hata alıyorum.Kod şöyle

from sklearn.linear_model import LinearRegression

linear_reg=LinearRegression()

x=df.deneyim
y=df.maas

linear_reg.fit(x,y)

aldığım hata ise

Expected 2D array, got 1D array instead:
array=[ 0.5  0.   1.   5.   8.   4.  15.   7.   3.   2.  12.  10.  14.   6. ].
Reshape your data either using array.reshape(-1, 1) if your data has a single feature or array.reshape(1, -1) if it contains a single sample.

bu şeklide. Yardımcı olabilir misiniz ?