Skip to content

Python code snippet – How to create dictionary taking one column as key and other as value in padas?

area_dict = dict(zip(lakes.area, lakes.count))
See also  How to delete NaN values in Python?
, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.