title: Using TensorFlow feature columns in input pipeline
body: <p>I am currently looking to use TensorFlow instead of using numpy for data preparation.
  I figured that I could add a few elements to my parse function in my input pipeline.</p>
  
  <p>While I was looking through the documenation, I came across feature columns.
  Feature columns seem to help us a bit with data cleaning, if the raw data is used and if the data is passed to the estimator. </p>
  
  <p>I was wondering if there were any functions similar to the feature columns which could do bucketing to the raw data.</p>
  
  <p>What exactly I mean by bucketing is, suppose if I have a dataset like</p>
  
  <pre><code>[['num']  #the column headers is for representation only
   [10], 
   [20], 
   [30], 
   [40], 
   [50], 
   [60], 
   [70], 
   [80], 
   [90], 
   [100]] 
  </code></pre>
  
  <p>i'll like to create one hot of the above row but in buckets,
  The output would look like</p>
  
  <pre><code>[['10-50', '51-100'] #the column headers is for representation only
  [   1   ,     0   ]
  [   1   ,     0   ]
  [   1   ,     0   ]
  [   1   ,     0   ]
  [   1   ,     0   ]
  [   0   ,     1   ]
  [   0   ,     1   ]
  [   0   ,     1   ]
  [   0   ,     1   ]
  [   0   ,     1   ]]
  </code></pre>
  
  <p>Is there any function which would automatically do this for me?
  I know there is a tf.cond function which i could use to implement this with, but it might be cumbersome and length to implement.
  i was wondering if there were any plug and play functions for it</p>
  
  <p>related links:
  <a href="https://stackoverflow.com/questions/50334755/how-feature-columns-work-in-tensorflow">How feature columns work in tensorflow?</a>
  <a href="https://www.tensorflow.org/guide/feature_columns" rel="nofollow noreferrer">https://www.tensorflow.org/guide/feature_columns</a></p>