{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Character, Number, Date, and Group functions\n", "---" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Connecting with the database" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "%load_ext sql\n", "# replace with your own credentials\n", "%sql ibm_db_sa://my-username:my-password@dashdb-txn-sbox-yp-dal09-03.services.dal.bluemix.net:50000/BLUDB" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### • GROUP FUNCTIONS" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "`Group functions` (also called `aggregate functions`) are mathematical functions to operate on sets of rows to give one result per set." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 1. AVG Function\n", "It returns the average of the values in the selected columns. " ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " * ibm_db_sa://lzv55210:***@dashdb-txn-sbox-yp-dal09-12.services.dal.bluemix.net:50000/BLUDB\n", "Done.\n" ] }, { "data": { "text/html": [ "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
countryfirst_namelast_nametest_score
United StatesMarshallBernadot54
United StatesCelindaMalkin51
UkraineGuillermoFurze53
UkraineAharonTunnow48
RussiaBailGoodwin46
PolandColeWinteringham49
SwedenEmlynErricker55
RussiaCatheeSivewright49
PolandBarnyIngerson57
SwedenSharlaPapaccio55
" ], "text/plain": [ "[('United States', 'Marshall', 'Bernadot', 54),\n", " ('United States', 'Celinda', 'Malkin', 51),\n", " ('Ukraine', 'Guillermo', 'Furze', 53),\n", " ('Ukraine', 'Aharon', 'Tunnow', 48),\n", " ('Russia', 'Bail', 'Goodwin', 46),\n", " ('Poland', 'Cole', 'Winteringham', 49),\n", " ('Sweden', 'Emlyn', 'Erricker', 55),\n", " ('Russia', 'Cathee', 'Sivewright', 49),\n", " ('Poland', 'Barny', 'Ingerson', 57),\n", " ('Sweden', 'Sharla', 'Papaccio', 55)]" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "%sql select * from STUDENTS" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " * ibm_db_sa://lzv55210:***@dashdb-txn-sbox-yp-dal09-12.services.dal.bluemix.net:50000/BLUDB\n", "Done.\n" ] }, { "data": { "text/html": [ "\n", " \n", " \n", " \n", " \n", " \n", " \n", "
1
51.700000
" ], "text/plain": [ "[(Decimal('51.700000'),)]" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "%sql select avg(test_score) from STUDENTS" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " * ibm_db_sa://lzv55210:***@dashdb-txn-sbox-yp-dal09-12.services.dal.bluemix.net:50000/BLUDB\n", "Done.\n" ] }, { "data": { "text/html": [ "\n", " \n", " \n", " \n", " \n", " \n", " \n", "
average_marks
51.700000
" ], "text/plain": [ "[(Decimal('51.700000'),)]" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "%sql select avg(test_score) as average_marks from STUDENTS" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 2. MIN Function\n", "Returns the data from the row in which the specified column contains the minimum value." ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " * ibm_db_sa://lzv55210:***@dashdb-txn-sbox-yp-dal09-12.services.dal.bluemix.net:50000/BLUDB\n", "Done.\n" ] }, { "data": { "text/html": [ "\n", " \n", " \n", " \n", " \n", " \n", " \n", "
min_marks
46
" ], "text/plain": [ "[(46,)]" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "%sql select min(test_score) as min_marks from STUDENTS" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 3. MAX Function\n", "Returns the data of the row in which the specified column contains the maximum value." ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " * ibm_db_sa://lzv55210:***@dashdb-txn-sbox-yp-dal09-12.services.dal.bluemix.net:50000/BLUDB\n", "Done.\n" ] }, { "data": { "text/html": [ "\n", " \n", " \n", " \n", " \n", " \n", " \n", "
max_marks
57
" ], "text/plain": [ "[(57,)]" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "%sql select max(test_score) as max_marks from STUDENTS" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 4. SUM Function\n", "Returns the total of all the values in a specified column." ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " * ibm_db_sa://lzv55210:***@dashdb-txn-sbox-yp-dal09-12.services.dal.bluemix.net:50000/BLUDB\n", "Done.\n" ] }, { "data": { "text/html": [ "\n", " \n", " \n", " \n", " \n", " \n", " \n", "
toal_marks
517
" ], "text/plain": [ "[(517,)]" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "%sql select sum(test_score) as toal_marks from STUDENTS" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 5. COUNT Function\n", "It adds the number of rows that matches the criteria specified in the select statement." ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " * ibm_db_sa://lzv55210:***@dashdb-txn-sbox-yp-dal09-12.services.dal.bluemix.net:50000/BLUDB\n", "Done.\n" ] }, { "data": { "text/html": [ "\n", " \n", " \n", " \n", " \n", " \n", " \n", "
no_of_rows
10
" ], "text/plain": [ "[(Decimal('10'),)]" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "%sql select count(*) as no_of_rows from STUDENTS" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### • CURRENT DATE AND TIME" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The most difficult part when working with dates is to be sure that the format of the date you are trying to insert, matches the format of the date column in the database. As long as your data contains only the date portion, your queries will work as expected. However, if a time portion is involved, it gets complicated." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 1. NOW\n", "This function returns the current date and time of the system." ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " * ibm_db_sa://lzv55210:***@dashdb-txn-sbox-yp-dal09-12.services.dal.bluemix.net:50000/BLUDB\n", "Done.\n" ] }, { "data": { "text/html": [ "\n", " \n", " \n", " \n", " \n", " \n", " \n", "
current_date_time
2020-11-12 10:40:45.698828
" ], "text/plain": [ "[(datetime.datetime(2020, 11, 12, 10, 40, 45, 698828),)]" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "%sql select now() as current_date_time from STUDENTS where test_score=54" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 2. CURDATE \n", "Returns the current date of the system." ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " * ibm_db_sa://lzv55210:***@dashdb-txn-sbox-yp-dal09-12.services.dal.bluemix.net:50000/BLUDB\n", "Done.\n" ] }, { "data": { "text/html": [ "\n", " \n", " \n", " \n", " \n", " \n", " \n", "
1
2020-11-12
" ], "text/plain": [ "[(datetime.date(2020, 11, 12),)]" ] }, "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], "source": [ "%sql VALUES CURRENT DATE" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 3. CURTIME\n", "Returns the current time of the system." ] }, { "cell_type": "code", "execution_count": 11, "metadata": { "scrolled": true }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " * ibm_db_sa://lzv55210:***@dashdb-txn-sbox-yp-dal09-12.services.dal.bluemix.net:50000/BLUDB\n", "Done.\n" ] }, { "data": { "text/html": [ "\n", " \n", " \n", " \n", " \n", " \n", " \n", "
1
10:40:47
" ], "text/plain": [ "[(datetime.time(10, 40, 47),)]" ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "%sql VALUES CURRENT TIME" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### • CHARACTER FUNCTIONS\n", "Character functions accept character inputs and can return either characters or number values as output." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 1. ASCII\n", "Returns the ASCII code of the leftmost character of the string passed." ] }, { "cell_type": "code", "execution_count": 12, "metadata": { "scrolled": true }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " * ibm_db_sa://lzv55210:***@dashdb-txn-sbox-yp-dal09-12.services.dal.bluemix.net:50000/BLUDB\n", "Done.\n" ] }, { "data": { "text/html": [ "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
first_nameascii_fname
Marshall77
Celinda67
Guillermo71
Aharon65
Bail66
Cole67
Emlyn69
Cathee67
Barny66
Sharla83
" ], "text/plain": [ "[('Marshall', 77),\n", " ('Celinda', 67),\n", " ('Guillermo', 71),\n", " ('Aharon', 65),\n", " ('Bail', 66),\n", " ('Cole', 67),\n", " ('Emlyn', 69),\n", " ('Cathee', 67),\n", " ('Barny', 66),\n", " ('Sharla', 83)]" ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "%sql select first_name, ascii(first_name) as ascii_fname from STUDENTS" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 2. CHAR\n", "Returns the character of ineteger." ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " * ibm_db_sa://lzv55210:***@dashdb-txn-sbox-yp-dal09-12.services.dal.bluemix.net:50000/BLUDB\n", "Done.\n" ] }, { "data": { "text/html": [ "\n", " \n", " \n", " \n", " \n", " \n", " \n", "
1
\u0017
" ], "text/plain": [ "[('\\x17',)]" ] }, "execution_count": 13, "metadata": {}, "output_type": "execute_result" } ], "source": [ "%sql VALUES chr('23') " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 3. CONCAT\n", "Returns the string that results from the concatenation of the arguments." ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " * ibm_db_sa://lzv55210:***@dashdb-txn-sbox-yp-dal09-12.services.dal.bluemix.net:50000/BLUDB\n", "Done.\n" ] }, { "data": { "text/html": [ "\n", " \n", " \n", " \n", " \n", " \n", " \n", "
name
MarshallBernadot
" ], "text/plain": [ "[('MarshallBernadot',)]" ] }, "execution_count": 14, "metadata": {}, "output_type": "execute_result" } ], "source": [ "%sql select concat(first_name, last_name) as name from STUDENTS where test_score=54" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 4. INSTR\n", "Returns the location of the specified substring in a string." ] }, { "cell_type": "code", "execution_count": 15, "metadata": { "scrolled": true }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " * ibm_db_sa://lzv55210:***@dashdb-txn-sbox-yp-dal09-12.services.dal.bluemix.net:50000/BLUDB\n", "Done.\n" ] }, { "data": { "text/html": [ "\n", " \n", " \n", " \n", " \n", " \n", " \n", "
at_index
4
" ], "text/plain": [ "[(4,)]" ] }, "execution_count": 15, "metadata": {}, "output_type": "execute_result" } ], "source": [ "%sql select instr('quadratic', 'dra') as at_index from STUDENTS where test_score=54" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 5. INSERT\n", "Inserts a substring into a string at the specified position." ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " * ibm_db_sa://lzv55210:***@dashdb-txn-sbox-yp-dal09-12.services.dal.bluemix.net:50000/BLUDB\n", "Done.\n" ] }, { "data": { "text/html": [ "\n", " \n", " \n", " \n", " \n", " \n", " \n", "
1
quwhattic
" ], "text/plain": [ "[('quwhattic',)]" ] }, "execution_count": 16, "metadata": {}, "output_type": "execute_result" } ], "source": [ "%sql select insert('quadratic',3,4, 'what') from STUDENTS where test_score=54" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 6. LENGTH\n", "Returns the length of the string." ] }, { "cell_type": "code", "execution_count": 17, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " * ibm_db_sa://lzv55210:***@dashdb-txn-sbox-yp-dal09-12.services.dal.bluemix.net:50000/BLUDB\n", "Done.\n" ] }, { "data": { "text/html": [ "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
first_namelength
Marshall8
Celinda7
Guillermo9
Aharon6
Bail4
Cole4
Emlyn5
Cathee6
Barny5
Sharla6
" ], "text/plain": [ "[('Marshall', 8),\n", " ('Celinda', 7),\n", " ('Guillermo', 9),\n", " ('Aharon', 6),\n", " ('Bail', 4),\n", " ('Cole', 4),\n", " ('Emlyn', 5),\n", " ('Cathee', 6),\n", " ('Barny', 5),\n", " ('Sharla', 6)]" ] }, "execution_count": 17, "metadata": {}, "output_type": "execute_result" } ], "source": [ "%sql select first_name, length(first_name) as length from STUDENTS" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 7. LOWER\n", "Converts all the letters to lower case." ] }, { "cell_type": "code", "execution_count": 18, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " * ibm_db_sa://lzv55210:***@dashdb-txn-sbox-yp-dal09-12.services.dal.bluemix.net:50000/BLUDB\n", "Done.\n" ] }, { "data": { "text/html": [ "\n", " \n", " \n", " \n", " \n", " \n", " \n", "
1
hello
" ], "text/plain": [ "[('hello',)]" ] }, "execution_count": 18, "metadata": {}, "output_type": "execute_result" } ], "source": [ "%sql select lower('HELLO') from STUDENTS where test_score=54" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 8. UPPER\n", "Converts all the letters to upper case." ] }, { "cell_type": "code", "execution_count": 19, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " * ibm_db_sa://lzv55210:***@dashdb-txn-sbox-yp-dal09-12.services.dal.bluemix.net:50000/BLUDB\n", "Done.\n" ] }, { "data": { "text/html": [ "\n", " \n", " \n", " \n", " \n", " \n", " \n", "
1
HELLO
" ], "text/plain": [ "[('HELLO',)]" ] }, "execution_count": 19, "metadata": {}, "output_type": "execute_result" } ], "source": [ "%sql select upper('hello') from STUDENTS where test_score=54" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### • NUMBER FUNCTIONS\n", "SQL numeric functions are used primarily for numeric manipulation and/or mathematical calculations." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 1. POWER (X,Y)\n", "Returns the value of x raised to the power of y." ] }, { "cell_type": "code", "execution_count": 20, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " * ibm_db_sa://lzv55210:***@dashdb-txn-sbox-yp-dal09-12.services.dal.bluemix.net:50000/BLUDB\n", "Done.\n" ] }, { "data": { "text/html": [ "\n", " \n", " \n", " \n", " \n", " \n", " \n", "
1
25
" ], "text/plain": [ "[(25,)]" ] }, "execution_count": 20, "metadata": {}, "output_type": "execute_result" } ], "source": [ "%sql VALUES POWER(5, 2)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 2. Round (M,N)\n", "Returns M round to N places to the right of decimal." ] }, { "cell_type": "code", "execution_count": 21, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " * ibm_db_sa://lzv55210:***@dashdb-txn-sbox-yp-dal09-12.services.dal.bluemix.net:50000/BLUDB\n", "Done.\n" ] }, { "data": { "text/html": [ "\n", " \n", " \n", " \n", " \n", " \n", " \n", "
1
873.700
" ], "text/plain": [ "[(Decimal('873.700'),)]" ] }, "execution_count": 21, "metadata": {}, "output_type": "execute_result" } ], "source": [ "%sql VALUES ROUND(873.729, 1)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 3. SQRT (N)\n", "Returns the square root of N." ] }, { "cell_type": "code", "execution_count": 22, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " * ibm_db_sa://lzv55210:***@dashdb-txn-sbox-yp-dal09-12.services.dal.bluemix.net:50000/BLUDB\n", "Done.\n" ] }, { "data": { "text/html": [ "\n", " \n", " \n", " \n", " \n", " \n", " \n", "
1
5.0
" ], "text/plain": [ "[(5.0,)]" ] }, "execution_count": 22, "metadata": {}, "output_type": "execute_result" } ], "source": [ "%sql VALUES SQRT(25)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 4. EXP (N)" ] }, { "cell_type": "code", "execution_count": 23, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " * ibm_db_sa://lzv55210:***@dashdb-txn-sbox-yp-dal09-12.services.dal.bluemix.net:50000/BLUDB\n", "Done.\n" ] }, { "data": { "text/html": [ "\n", " \n", " \n", " \n", " \n", " \n", " \n", "
1
20.085536923187668
" ], "text/plain": [ "[(20.085536923187668,)]" ] }, "execution_count": 23, "metadata": {}, "output_type": "execute_result" } ], "source": [ "%sql VALUES EXP(3)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 5. MOD (N,M)" ] }, { "cell_type": "code", "execution_count": 24, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " * ibm_db_sa://lzv55210:***@dashdb-txn-sbox-yp-dal09-12.services.dal.bluemix.net:50000/BLUDB\n", "Done.\n" ] }, { "data": { "text/html": [ "\n", " \n", " \n", " \n", " \n", " \n", " \n", "
1
25
" ], "text/plain": [ "[(25,)]" ] }, "execution_count": 24, "metadata": {}, "output_type": "execute_result" } ], "source": [ "%sql VALUES MOD(125, 50)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 6. FLOOR" ] }, { "cell_type": "code", "execution_count": 25, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " * ibm_db_sa://lzv55210:***@dashdb-txn-sbox-yp-dal09-12.services.dal.bluemix.net:50000/BLUDB\n", "Done.\n" ] }, { "data": { "text/html": [ "\n", " \n", " \n", " \n", " \n", " \n", " \n", "
1
3
" ], "text/plain": [ "[(Decimal('3'),)]" ] }, "execution_count": 25, "metadata": {}, "output_type": "execute_result" } ], "source": [ "%sql VALUES FLOOR(3.35)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 7. CEIL" ] }, { "cell_type": "code", "execution_count": 26, "metadata": { "scrolled": true }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " * ibm_db_sa://lzv55210:***@dashdb-txn-sbox-yp-dal09-12.services.dal.bluemix.net:50000/BLUDB\n", "Done.\n" ] }, { "data": { "text/html": [ "\n", " \n", " \n", " \n", " \n", " \n", " \n", "
1
4
" ], "text/plain": [ "[(Decimal('4'),)]" ] }, "execution_count": 26, "metadata": {}, "output_type": "execute_result" } ], "source": [ "%sql VALUES Ceiling(3.35)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Thanks for reading :)\n", "Created by [Tarun Kamboj](https://www.linkedin.com/in/kambojtarun/)." ] } ], "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.7.6" } }, "nbformat": 4, "nbformat_minor": 4 }