Guest User

Untitled

a guest
Oct 17th, 2018
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.00 KB | None | 0 0
  1. {
  2. "cells": [
  3. {
  4. "cell_type": "code",
  5. "execution_count": 5,
  6. "metadata": {},
  7. "outputs": [],
  8. "source": [
  9. "import pandas as pd\n",
  10. "import numpy as np\n",
  11. "import os\n",
  12. "import matplotlib.pyplot as plt\n",
  13. "%matplotlib inline "
  14. ]
  15. },
  16. {
  17. "cell_type": "code",
  18. "execution_count": 7,
  19. "metadata": {},
  20. "outputs": [],
  21. "source": [
  22. "DATA_FOLDER = 'input/'\n",
  23. "\n",
  24. "transactions = pd.read_csv(os.path.join(DATA_FOLDER, 'sales_train.csv'))\n",
  25. "items = pd.read_csv(os.path.join(DATA_FOLDER, 'items.csv'))\n",
  26. "item_categories = pd.read_csv(os.path.join(DATA_FOLDER, 'item_categories.csv'))\n",
  27. "shops = pd.read_csv(os.path.join(DATA_FOLDER, 'shops.csv'))"
  28. ]
  29. },
  30. {
  31. "cell_type": "markdown",
  32. "metadata": {},
  33. "source": [
  34. "The first question is:\n",
  35. "\n",
  36. "1. ** What was the maximum total revenue among all the shops in September, 2014?** \n",
  37. "\n",
  38. "\n",
  39. "* Hereinafter *revenue* refers to total sales minus value of goods returned.\n",
  40. "\n",
  41. "*Hints:*\n",
  42. "\n",
  43. "* Sometimes items are returned, find such examples in the dataset. \n",
  44. "* 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",
  45. "* 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."
  46. ]
  47. },
  48. {
  49. "cell_type": "markdown",
  50. "metadata": {},
  51. "source": []
  52. }
  53. ],
  54. "metadata": {
  55. "kernelspec": {
  56. "display_name": "Python 3",
  57. "language": "python",
  58. "name": "python3"
  59. },
  60. "language_info": {
  61. "codemirror_mode": {
  62. "name": "ipython",
  63. "version": 3
  64. },
  65. "file_extension": ".py",
  66. "mimetype": "text/x-python",
  67. "name": "python",
  68. "nbconvert_exporter": "python",
  69. "pygments_lexer": "ipython3",
  70. "version": "3.5.2"
  71. }
  72. },
  73. "nbformat": 4,
  74. "nbformat_minor": 2
  75. }
Add Comment
Please, Sign In to add comment