data = [Row(x=[float(x), float(2 * x)], key=str(x % 2)) for x in range(1, 6)]
df_analyzed = tfs.analyze(sqlContext.createDataFrame(data))
df = sqlContext.createDataFrame(data)
# this would work
grouped_df_analyzed = df_analyzed.groupby('key')
In [79]: with tf.Graph().as_default() as g:
...: x = tf.placeholder(tf.double, [None, 2], name='x_input')
...: y = tf.reduce_mean(x, 0, name='x')
...: df_1 = tfs.aggregate(y, grouped_df_analyzed)
#while this would fail..
grouped_df = df.groupby('key')
In [80]: with tf.Graph().as_default() as g:
...: x = tf.placeholder(tf.double, [None, 2], name='x_input')
...: y = tf.reduce_mean(x, 0, name='x')
...: df_1 = tfs.aggregate(y, grouped_df)
# with reason
java.lang.Exception: The data column 'x' has shape [?,?], not compatible with shape [?,2] requested by the TF graph
which would be useful if there is a function the take human input into the meta data...
which would be useful if there is a function the take human input into the meta data...