In this video, see how to use shape.
- [Instructor] Shape.…The shape attribute returns a tuple,…that's rows and columns representing…the dimensionality of the DataFrame.…It's a good idea to check this against the original CSV file…to ensure that all the expected data…has been read into the DataFrame.…The shape attribute is useful…for confirming the dimensions…of your dataset.…We'll head over to our Jupyter Notebook.…What we need to enter here is our DataFrame…which is 00 and shape, the shape attribute.…
So, the 29,216 corresponds to the number of rows…in the CSV file…and the 10 corresponds to the number of columns.…We can confirm that…and we can see for example here…that the city, edition, sport and so on,…these are the 10 columns that we have…and we actually have 29,216 rows of data in our table.…One helpful tip is that sometimes…you might only want the number of rows…or columns as part of your code…and you can extract this information…from this tuple by just typing shape…and zero for the number of rows…and if you just want the column,…you can enter the one there…
- Working with plots
- Boolean indexing
- String handling
- Grouping data
- Creating your own colormaps
Skill Level Intermediate
1. Technical Setup
2. Series and DataFrames
3. Data Input and Validation
4. Basic Analysis
5. Basic Plotting
9. Data Visualizations
Next steps1m 1s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.