title: Can sklearn.compose.ColumnTransformer be used with a custom-defined transformer?
body: <p>I would like to take the logarithm of specific columns of my dataframe. 
  I created a new transformer object:</p>
  
  <p><code>from sklearn.preprocessing import FunctionTransformer</code>
  <code>log_transformer = FunctionTransformer(np.log10, validate=True)</code></p>
  
  <p>and it works nicely on one specific column of my dataframe:</p>
  
  <p><code>log_transformer.transform(df['_column'])</code>
  Also, one could also overwrite the specific column of the original dataframe like: </p>
  
  <p><code>df[['_column']]=log_transformer.transform(df[['_column']])</code></p>
  
  <p>However, this operation then changes the original dataframe and wouldn't be useful in a pipeline.</p>
  
  <p>When I try to include this transformer object into <code>ColumnTransformer</code>, I get an error message:
  <code>columnTransformer = ColumnTransformer([('log_transform', log_transformer.transform(), [0,5)], remainder='passthrough')</code></p>
  
  <p>How should I pass on the custom-defined transformer object to <code>ColumnTransformer</code>? (The same syntax would work very nicely for built-in transformers, as suggested in this article: <a href="https://towardsdatascience.com/columntransformer-in-scikit-for-labelencoding-and-onehotencoding-in-machine-learning-c6255952731b" rel="nofollow noreferrer">https://towardsdatascience.com/columntransformer-in-scikit-for-labelencoding-and-onehotencoding-in-machine-learning-c6255952731b</a>)</p>
  
  <p>Thank you for your help!</p>