]> us-delaporte.pagekite.me Git - dotfiles.git/blob - data/issues.ipynb
Open a data file
[dotfiles.git] / data / issues.ipynb
1 {
2 "cells": [
3 {
4 "cell_type": "code",
5 "execution_count": 2,
6 "metadata": {},
7 "outputs": [],
8 "source": [
9 "# Get ye data\n",
10 "import glob\n",
11 "import os\n",
12 "\n",
13 "data_files = glob.glob(os.path.expanduser('~\\\\Data\\\\*.json'))\n"
14 ]
15 },
16 {
17 "cell_type": "code",
18 "execution_count": 5,
19 "metadata": {},
20 "outputs": [
21 {
22 "name": "stdout",
23 "output_type": "stream",
24 "text": [
25 "3.12.2\n"
26 ]
27 }
28 ],
29 "source": [
30 "import platform\n",
31 "print(platform.python_version())"
32 ]
33 },
34 {
35 "cell_type": "code",
36 "execution_count": null,
37 "metadata": {},
38 "outputs": [],
39 "source": [
40 "import pandas as pd\n",
41 "\n",
42 "data_sets = []\n",
43 "\n",
44 "file = data_files[0]\n",
45 "print(file)\n",
46 "\n",
47 "f = open(file, encoding='utf-16')\n",
48 "data = pd.read_json(f)\n",
49 "\n",
50 "print(data)\n"
51 ]
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.12.2"
71 }
72 },
73 "nbformat": 4,
74 "nbformat_minor": 2
75 }