Adding Rows and Columns in a DataFrame
Learn how to add rows and columns in a DataFrame.
We'll cover the following...
DataFrames hold tabular data. Databases hold tabular data. We can perform many of the same operations on DataFrames that we can on database tables. Here are the two tables we’ll be using for examples:
Index | Color | Name |
0 | Blue | John |
1 | Blue | George |
2 | Purple | Ringo |
Index | Color | Name |
3 | Red | Paul |
1 | Blue | George |
2 | - | Ringo |
Adding rows to DataFrames
Let’s assume that we have two DataFrames that we want to combine into a single DataFrame, with rows from both. The simplest way to ...