expected 2d array got scalar array instead, Please help out : Hello everyone i am getting this error

ValueError: Expected 2D array, got scalar array instead:
array=6.5.
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.

while executing this code

#SVR
# Importing the libraries
import numpy as np

import matplotlib.pyplot as plt

import pandas as pd

# Importing the dataset
dataset = pd.read_csv('Position_Salaries.csv')

X = dataset.iloc[:, 1:2].values

y = dataset.iloc[:, 2].values


#Fitting the SVR to the Data Set
from sklearn.svm import SVR

regressor = SVR(kernel = 'rbf', gamma = 'auto')

regressor.fit(X, y)

#Predicting a new result 
y_pred = regressor.predict(6.5)
