A good example is here
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
dataset = pd.read_csv('Salary_Data.csv') #in your case right name of your file
X=dataset.iloc[:,:-1].values #this will convert dataframe to object
df = pd.DataFrame(X)
You can view data in dataframe this converts arrray to dataframe .
And the variable explorer accepts the dataframe. The above is correct and checked code