pandas Series object or DataFrame. None if absent.
batch_size
int, size of batches to return.
num_epochs
int, number of epochs to iterate over data. If not None,
read attempts that would exceed this value will raise OutOfRangeError.
shuffle
bool, whether to read the records in random order.
queue_capacity
int, size of the read queue. If None, it will be set
roughly to the size of x.
num_threads
Integer, number of threads used for reading and enqueueing. In
order to have predicted and repeatable order of reading and enqueueing,
such as in prediction and evaluation mode, num_threads should be 1.
target_column
str, name to give the target column y. This parameter
is not used when y is a DataFrame.
Returns
Function, that has signature of ()->(dict of features, target)
Raises
ValueError
if x already contains a column with the same name as y, or
if the indexes of x and y don't match.
[null,null,["Last updated 2020-10-01 UTC."],[],[],null,["# tf.estimator.inputs.pandas_input_fn\n\n\u003cbr /\u003e\n\n|----------------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/estimator/tree/master/tensorflow_estimator/python/estimator/inputs/pandas_io.py) |\n\nReturns input function that would feed Pandas DataFrame into the model.\n\n#### View aliases\n\n\n**Compat aliases for migration**\n\nSee\n[Migration guide](https://www.tensorflow.org/guide/migrate) for\nmore details.\n\n[`tf.compat.v1.estimator.inputs.pandas_input_fn`](/api_docs/python/tf/compat/v1/estimator/inputs/pandas_input_fn)\n\n\u003cbr /\u003e\n\n tf.estimator.inputs.pandas_input_fn(\n x, y=None, batch_size=128, num_epochs=1, shuffle=None, queue_capacity=1000,\n num_threads=1, target_column='target'\n )\n\n| **Note:** `y`'s index must match `x`'s index.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `x` | pandas `DataFrame` object. |\n| `y` | pandas `Series` object or `DataFrame`. `None` if absent. |\n| `batch_size` | int, size of batches to return. |\n| `num_epochs` | int, number of epochs to iterate over data. If not `None`, read attempts that would exceed this value will raise `OutOfRangeError`. |\n| `shuffle` | bool, whether to read the records in random order. |\n| `queue_capacity` | int, size of the read queue. If `None`, it will be set roughly to the size of `x`. |\n| `num_threads` | Integer, number of threads used for reading and enqueueing. In order to have predicted and repeatable order of reading and enqueueing, such as in prediction and evaluation mode, `num_threads` should be 1. |\n| `target_column` | str, name to give the target column `y`. This parameter is not used when `y` is a `DataFrame`. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|---|---|\n| Function, that has signature of ()-\\\u003e(dict of `features`, `target`) ||\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Raises ------ ||\n|--------------|-----------------------------------------------------------------------------------------------------------|\n| `ValueError` | if `x` already contains a column with the same name as `y`, or if the indexes of `x` and `y` don't match. |\n| `ValueError` | if 'shuffle' is not provided or a bool. |\n\n\u003cbr /\u003e"]]