How to read the string and long features in tensorflow
<p>The tensorflow, I can't read string,long, only short float allowed? Why?  </p>

<pre><code>import tensorflow as tf
import numpy as np

# Data sets
IRIS_TRAINING = "seRelFeatures.csv"
IRIS_TEST = "seRelFeatures.csv"

# Load datasets.
training_set = tf.contrib.learn.datasets.base.load_csv(filename=IRIS_TRAINING, target_dtype=np.int)
test_set = tf.contrib.learn.datasets.base.load_csv(filename=IRIS_TEST, target_dtype=np.int)
</code></pre>

<p>here is the error</p>

<pre><code>/home/xuejiao/anaconda2/bin/python /home/xuejiao/Desktop/HDSO_DirectAnswer/training_testing/dnn_semiSuper.py
Traceback (most recent call last):
  File "/home/xuejiao/Desktop/HDSO_DirectAnswer/training_testing/dnn_semiSuper.py", line 9, in &lt;module&gt;
    training_set = tf.contrib.learn.datasets.base.load_csv(filename=IRIS_TRAINING, target_dtype=np.int)
  File "/home/xuejiao/anaconda2/lib/python2.7/site-packages/tensorflow/contrib/learn/python/learn/datasets/base.py", line 47, in load_csv
    target[i] = np.asarray(ir.pop(target_column), dtype=target_dtype)
  File "/home/xuejiao/anaconda2/lib/python2.7/site-packages/numpy/core/numeric.py", line 482, in asarray
    return array(a, dtype, copy=False, order=order)
ValueError: invalid literal for long() with base 10: ''

Process finished with exit code 1
</code></pre>

<p>Actually I solved this problem by myself, this mistake mean</p>

<pre><code>ValueError: invalid literal for long() with base 10: ''
</code></pre>

<p>I have some empty cell, but actually I don't have on the view.
After I check it, it cased by I delete the last column but I just delete the content didn't delete the cells, so from view can't find any empty </p>

python csv tensorflow