diff --git a/site/en/tutorials/structured_data/time_series.ipynb b/site/en/tutorials/structured_data/time_series.ipynb index ef16f56e628..8957df513b7 100644 --- a/site/en/tutorials/structured_data/time_series.ipynb +++ b/site/en/tutorials/structured_data/time_series.ipynb @@ -181,12 +181,8 @@ }, { "cell_type": "code", - "execution_count": 0, - "metadata": { - "colab": {}, - "colab_type": "code", - "id": "7AoxQuTrWIbi" - }, + "execution_count": null, + "metadata": {}, "outputs": [], "source": [ "def univariate_data(dataset, start_index, end_index, history_size, target_size):\n", @@ -201,7 +197,7 @@ " indices = range(i-history_size, i)\n", " # Reshape data from (history_size,) to (history_size, 1)\n", " data.append(np.reshape(dataset[indices], (history_size, 1)))\n", - " labels.append(dataset[i+target_size])\n", + " labels.append(dataset[i + target_size])\n", " return np.array(data), np.array(labels)" ] }, @@ -312,7 +308,7 @@ }, "outputs": [], "source": [ - "uni_data = uni_data.values" + "uni_data = uni_data.to_numpy()" ] }, { @@ -322,8 +318,7 @@ "id": "-eFckdUUHWmT" }, "source": [ - "It is important to scale features before training a neural network. Standardization is a common way of doing this scaling by subtracting the mean and dividing by the standard deviation of each feature.", - "You could also use a `tf.keras.utils.normalize` method that rescales the values into a range of [0,1]." + "It is important to scale features before training a neural network. Standardization is a common way of doing this scaling by subtracting the mean and dividing by the standard deviation of each feature.You could also use a `tf.keras.utils.normalize` method that rescales the values into a range of [0,1]." ] }, { @@ -1333,6 +1328,7 @@ }, "kernelspec": { "display_name": "Python 3", + "language": "python", "name": "python3" } },