If you only need the dictionary keys 1
, 2
, and 3
use: your_dict.keys()
.
If you only need the dictionary values -0.3246
, -0.9185
, and -3985
use: your_dict.values()
.
If you want both keys and values use: your_dict.items()
which returns a list of tuples [(key1, value1), (key2, value2), ...]
.
Related Contents:
- Iterating over dictionaries using ‘for’ loops
- Why dict.get(key) instead of dict[key]?
- Get key by value in dictionary
- Split / Explode a column of dictionaries into separate columns with pandas
- Reverse / invert a dictionary mapping
- Make a dictionary with duplicate keys in Python
- How do I initialize a dictionary of empty lists in Python?
- Python list of dictionaries search
- Why can’t I use a list as a dict key in python?
- Remove duplicate dict in list in Python
- Create Pandas DataFrame from txt file with specific pattern
- Modifying a Python dict while iterating over it
- Converting dictionary to JSON
- Python Dictionary Comprehension
- How does collections.defaultdict work?
- Access an arbitrary element in a dictionary in Python
- List of unique dictionaries
- Should I use ‘has_key()’ or ‘in’ on Python dicts?
- How to avoid “RuntimeError: dictionary changed size during iteration” error?
- merging several python dictionaries
- Get the key corresponding to the minimum value within a dictionary
- How can I make a dictionary from separate lists of keys and values?
- How do you create nested dict in Python?
- How to sort objects by multiple keys?
- Hashing a dictionary?
- Thread Safety in Python’s dictionary
- Intersecting two dictionaries
- What do I do when I need a self referential dictionary?
- Comparing Python dictionaries and nested dictionaries
- How does the key argument in python’s sorted function work?
- Destructuring-bind dictionary contents
- merging Python dictionaries
- How do I check that multiple keys are in a dict in a single pass?
- Remove dictionary from list
- Convert list into a dictionary [duplicate]
- switching keys and values in a dictionary in python [duplicate]
- Recursive diff of two dictionaries (keys and values)?
- convert csv file to list of dictionaries
- Converting a list of tuples into a dict
- Why updating “shallow” copy dictionary doesn’t update “original” dictionary? [duplicate]
- PySpark create new column with mapping from a dict
- Why does updating one dictionary object affect other? [duplicate]
- How to split dictionary into multiple dictionaries fast
- How do I extract all the values of a specific key from a list of dictionaries?
- Difference between defining typing.Dict and dict?
- Why do you have to call .items() when iterating over a dictionary in Python?
- In what case would I use a tuple as a dictionary key? [closed]
- How to generate all combination from values in dict of lists in Python
- Know the depth of a dictionary
- pandas extract year from datetime: df[‘year’] = df[‘date’].year is not working