We can create a DataFrame from a list of simple tuples, and can even choose the specific elements of the tuples we want to use.
Code #1: Simply passing tuple to DataFrame constructor.
Code #2: Using
Code #3: Using
Code #4: For pivoting it possible.
- Creating Pandas dataframe using list of lists
- Creating a Pandas DataFrame
- Creating a dataframe from Pandas series
- Creating views on Pandas DataFrame | Set - 2
- Creating views on Pandas DataFrame
- Python | Creating a Pandas dataframe column based on a given condition
- Create a Pandas DataFrame from List of Dicts
- Create a list from rows in Pandas dataframe
- Create a list from rows in Pandas DataFrame | Set 2
- Python | Remove tuples from list of tuples if greater than n
- Python | Count tuples occurrence in list of tuples
- Python | Remove tuples having duplicate first value from given list of tuples
- Python | Remove duplicate tuples from list of tuples
- Python | Find the tuples containing the given element from a list of tuples
- Python | Convert list of nested dictionary into Pandas dataframe
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.