import pandas as pd
from category_encoders import BinaryEncoder
be = BinaryEncoder()
import category_encoders as ce
#Binary Encoding
#reading dataset
data = pd.read_csv('bigmart.csv')
print(data.head(),'\n')

#value count of different categories of Item types 
x = data['Item_Type'].value_counts()
print(x,'\n')

y = be.fit_transform(data['Item_Type'])
print(y,'\n')

#concatenating the original data and encoded data togather
data = pd.concat([data,y],axis=1)
print(data.columns,'\n')


#BaseN Encoding for column 'Name' using base 4. BaseN Encoding reduces dimensionality of Encoding
df = pd.read_csv('fifa.csv')
print(df.head,'\n')
a = ce.BaseNEncoder(cols=['Name'],base=4)
a = a.fit_transform(df[['Name']])

print(a,'\n')
a71281658f8bb90534b17f081b2eca5d5267be4f
<mask token>

<mask token>
print(data.head(), '\n')
<mask token>
print(x, '\n')
<mask token>
print(y, '\n')
<mask token>
print(data.columns, '\n')
<mask token>
print(df.head, '\n')
<mask token>
print(a, '\n')

<mask token>
be = BinaryEncoder()
<mask token>
data = pd.read_csv('bigmart.csv')
print(data.head(), '\n')
x = data['Item_Type'].value_counts()
print(x, '\n')
y = be.fit_transform(data['Item_Type'])
print(y, '\n')
data = pd.concat([data, y], axis=1)
print(data.columns, '\n')
df = pd.read_csv('fifa.csv')
print(df.head, '\n')
a = ce.BaseNEncoder(cols=['Name'], base=4)
a = a.fit_transform(df[['Name']])
print(a, '\n')

import pandas as pd
from category_encoders import BinaryEncoder
be = BinaryEncoder()
import category_encoders as ce
data = pd.read_csv('bigmart.csv')
print(data.head(), '\n')
x = data['Item_Type'].value_counts()
print(x, '\n')
y = be.fit_transform(data['Item_Type'])
print(y, '\n')
data = pd.concat([data, y], axis=1)
print(data.columns, '\n')
df = pd.read_csv('fifa.csv')
print(df.head, '\n')
a = ce.BaseNEncoder(cols=['Name'], base=4)
a = a.fit_transform(df[['Name']])
print(a, '\n')

import pandas as pd
from category_encoders import BinaryEncoder
be = BinaryEncoder()
import category_encoders as ce
#Binary Encoding
#reading dataset
data = pd.read_csv('bigmart.csv')
print(data.head(),'\n')

#value count of different categories of Item types 
x = data['Item_Type'].value_counts()
print(x,'\n')

y = be.fit_transform(data['Item_Type'])
print(y,'\n')

#concatenating the original data and encoded data togather
data = pd.concat([data,y],axis=1)
print(data.columns,'\n')


#BaseN Encoding for column 'Name' using base 4. BaseN Encoding reduces dimensionality of Encoding
df = pd.read_csv('fifa.csv')
print(df.head,'\n')
a = ce.BaseNEncoder(cols=['Name'],base=4)
a = a.fit_transform(df[['Name']])

print(a,'\n')