Python Forum
JupyterLab Dictionary Content Output Format
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
JupyterLab Dictionary Content Output Format
#1
Hi,

Brand new to Python and this my first question on the forum (please be gentle Rolleyes)


I have defined a dictionary with separate keys and values as lists, shown below;

people = {
    "first": ["Corey", "Jane", "John"],
    "last": ["Shafer", "Doe", "Millard"],
    "email":["CoreyMSchafer@gmail.com","JaneDoe@email.com","JohnM81@hotmail.com"]
}
When i print the contents of the dictionary in "JupyterLab" the output is then returned in the following format;

{'first': ['Corey', 'Jane', 'John'],
 'last': ['Shafer', 'Doe', 'Millard'],
 'email': ['CoreyMSchafer@gmail.com',
  'JaneDoe@email.com',
  'JohnM81@hotmail.com']}
When i do the same using "Spyder" the output is returned with each keys contents list on the same line, as shown below;

{'first': ['Corey', 'Jane', 'John'], 'last': ['Shafer', 'Doe', 'Millard'], 'email': ['CoreyMSchafer@gmail.com', 'JaneDoe@email.com', 'JohnM81@hotmail.com']}
How do i get "JupyterLab" to output the contents of the dictionary the same format as "Spyder" does, all on a single line? Or at least each keys list completely on each keys line.



Must be a setting in "JupyterLabs" perhaphs?


Many thanks for taking your time, any help is really appreciated.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Can I format decimal places by column with a dictionary? Mark17 2 169 Dec-28-2020, 10:13 PM
Last Post: Mark17
  Issue accessing data from Dictionary/List in the right format LuisSatch 2 408 Jul-25-2020, 06:12 AM
Last Post: LuisSatch
  Format SQL Query Output phillyfa 2 383 Apr-22-2020, 07:45 AM
Last Post: buran
  Save output into a Excel Sheet with Format Table skaailet 1 515 Apr-17-2020, 11:56 PM
Last Post: thirteendec
  Display output in readable format and save hnkrish 1 765 Jul-19-2019, 09:29 AM
Last Post: Larz60+
  About the output format. shang2019 4 907 Jan-10-2019, 07:38 PM
Last Post: buran
  python script to get wildcard mask output in the following format techrichit 0 1,752 Aug-10-2018, 11:01 PM
Last Post: techrichit
  Recursion through nested dictionary - Unable to get desired output Staedtler 6 5,412 Jul-09-2018, 02:55 PM
Last Post: Staedtler
  Output ZMQ-content to browser AarClay 8 3,091 Nov-26-2017, 02:01 PM
Last Post: AarClay

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020