{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "e4dbb001-8948-4ab0-8447-b2be0c4072de", "metadata": { "execution": { "iopub.execute_input": "2021-06-21T23:07:21.982147Z", "iopub.status.busy": "2021-06-21T23:07:21.981527Z", "iopub.status.idle": "2021-06-21T23:07:22.174400Z", "shell.execute_reply": "2021-06-21T23:07:22.174804Z" }, "papermill": { "duration": 0.201383, "end_time": "2021-06-21T23:07:22.175075", "exception": false, "start_time": "2021-06-21T23:07:21.973692", "status": "completed" }, "tags": [] }, "outputs": [], "source": [ "import os\n", "import pandas as pd\n", "from datetime import datetime" ] }, { "cell_type": "code", "execution_count": 2, "id": "965fd964-c663-4352-b38c-df43abd19ca3", "metadata": { "execution": { "iopub.execute_input": "2021-06-21T23:07:22.191713Z", "iopub.status.busy": "2021-06-21T23:07:22.190684Z", "iopub.status.idle": "2021-06-21T23:07:22.216690Z", "shell.execute_reply": "2021-06-21T23:07:22.217208Z" }, "papermill": { "duration": 0.036717, "end_time": "2021-06-21T23:07:22.217407", "exception": false, "start_time": "2021-06-21T23:07:22.180690", "status": "completed" }, "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Processing file ->output-1.csv\n", " userid name lastupdated\n", "0 u1 user1 2021-06-21 23:07:20.439644\n", "1 u2 user2 2021-06-21 23:07:20.439644\n", "Processing file ->output-2.csv\n", " userid name lastupdated\n", "0 u3 user3 2021-06-21 23:07:20.449851\n", "1 u4 user4 2021-06-21 23:07:20.449851\n", "Processing file ->output-3.csv\n", " userid name lastupdated\n", "0 u1 user1 2021-06-21 23:07:21.061698\n", "1 u2 user2 2021-06-21 23:07:21.061698\n", "Processing file ->output-4.csv\n", " userid name lastupdated\n", "0 u3 user3 2021-06-21 23:07:21.074306\n", "1 u4 user4 2021-06-21 23:07:21.074306\n" ] } ], "source": [ "# Consume input csv files\n", "files = ['output-1.csv', 'output-2.csv', 'output-3.csv', 'output-4.csv']\n", "\n", "\n", "n=0\n", "for file in files:\n", " n=n+1\n", " print(f'Processing file ->{file}')\n", " input = pd.read_csv(file, header=0)\n", " print(input)" ] }, { "cell_type": "code", "execution_count": null, "id": "46778fe7-a10e-4e6e-a3fb-380c37c1c17d", "metadata": { "papermill": { "duration": 0.004707, "end_time": "2021-06-21T23:07:22.226308", "exception": false, "start_time": "2021-06-21T23:07:22.221601", "status": "completed" }, "tags": [] }, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.6" }, "papermill": { "default_parameters": {}, "duration": 1.415265, "end_time": "2021-06-21T23:07:22.545542", "environment_variables": {}, "exception": null, "input_path": "/home/jovyan/work/pipelines/consumer.ipynb", "output_path": "/home/jovyan/work/pipelines/consumer.ipynb", "parameters": {}, "start_time": "2021-06-21T23:07:21.130277", "version": "2.3.3" } }, "nbformat": 4, "nbformat_minor": 5 }