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":["[email protected]","[email protected]","[email protected]"]
}
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': ['[email protected]',
  '[email protected]',
  '[email protected]']}
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': ['[email protected]', '[email protected]', '[email protected]']}
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
  Anaconda 2.4.2: The JupyterLab 3.5.3 fails to run the python code of the Geographical jamalnuman 0 312 Aug-23-2023, 07:48 AM
Last Post: jamalnuman
  Setting up new Python kernel for JupyterLab Desktop on M1 Mac daler6 0 1,225 Jun-20-2022, 03:45 AM
Last Post: daler6
  Output ZMQ-content to browser AarClay 9 8,413 Jun-02-2021, 05:03 PM
Last Post: YogiMike
  format the output from a nested dictionary. nostradamus64 9 4,424 May-03-2021, 04:45 PM
Last Post: nostradamus64
  Can I format decimal places by column with a dictionary? Mark17 2 2,511 Dec-28-2020, 10:13 PM
Last Post: Mark17
  Issue accessing data from Dictionary/List in the right format LuisSatch 2 2,168 Jul-25-2020, 06:12 AM
Last Post: LuisSatch
  Format SQL Query Output phillyfa 2 3,956 Apr-22-2020, 07:45 AM
Last Post: buran
  Save output into a Excel Sheet with Format Table skaailet 1 2,455 Apr-17-2020, 11:56 PM
Last Post: thirteendec
  Display output in readable format and save hnkrish 1 2,587 Jul-19-2019, 09:29 AM
Last Post: Larz60+
  About the output format. shang2019 4 2,626 Jan-10-2019, 07:38 PM
Last Post: buran

Forum Jump:

User Panel Messages

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