I'm a newbie from pandas and I'm in a stage of fundamental.
I tried to encode some data and put the same columns into data_enc.
from sklearn.preprocessing import LabelEncoder
labelencoder = LabelEncoder()
new_data = data[['HeatingQC']][:35].copy()
data_enc = pd.DataFrame(labelencoder.fit_transform(new_data),
columns = [new_data.columns + '_enc'],
index = new_data.index)
print(data_enc.columns[0])
print(new_data.columns[0])
But then output is unexpected. that is
('HeatingQC_enc',)
HeatingQC
My question is, where does the parenthesis come from and how can I remove them?