Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "cells": [
- {
- "cell_type": "code",
- "execution_count": 5,
- "metadata": {},
- "outputs": [],
- "source": [
- "import pandas as pd\n",
- "import numpy as np\n",
- "import os\n",
- "import matplotlib.pyplot as plt\n",
- "%matplotlib inline "
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 7,
- "metadata": {},
- "outputs": [],
- "source": [
- "DATA_FOLDER = 'input/'\n",
- "\n",
- "transactions = pd.read_csv(os.path.join(DATA_FOLDER, 'sales_train.csv'))\n",
- "items = pd.read_csv(os.path.join(DATA_FOLDER, 'items.csv'))\n",
- "item_categories = pd.read_csv(os.path.join(DATA_FOLDER, 'item_categories.csv'))\n",
- "shops = pd.read_csv(os.path.join(DATA_FOLDER, 'shops.csv'))"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "The first question is:\n",
- "\n",
- "1. ** What was the maximum total revenue among all the shops in September, 2014?** \n",
- "\n",
- "\n",
- "* Hereinafter *revenue* refers to total sales minus value of goods returned.\n",
- "\n",
- "*Hints:*\n",
- "\n",
- "* Sometimes items are returned, find such examples in the dataset. \n",
- "* It is handy to split `date` field into [`day`, `month`, `year`] components and use `df.year == 14` and `df.month == 9` in order to select target subset of dates.\n",
- "* You may work with `date` feature as with srings, or you may first convert it to `pd.datetime` type with `pd.to_datetime` function, but do not forget to set correct `format` argument."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "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.5.2"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 2
- }
Add Comment
Please, Sign In to add comment