I had run the following OneHotEncoder code on jupyter notebook, it's fine:
ColumnTransformer(transformers=[('col_tnf',OneHotEncoder(sparse=False,drop='first'),0,1,3,8,11])],remainder='passthrough')
It's running and gives the output, while the same, I am running using PyCharm as a Streamlit app, its throwing error as AttributeError: 'OneHotEncoder' object has no attribute '_infrequent_enabled'