Data ScienceLesson 6Free preview
DS DataFrame
This lesson is part of Data Science · All levels
Summary
DataFrame is a two-dimensional data structure of a library pandas that resembles a spreadsheet table with rows and columns. We can make it from a dictionary, read a CSV file, and then explore the contents through functions like head() and shape attributes. Column selection is performed with square brackets such as df['column'].
Key points
- DataFrame = a two-dimensional table with a row and column named.
- Making: pd.DataFrame(data) from a dictionary or list.
- Head() displays the first row; shape displays (lines, columns).
- Column selection: df['name_column'] or df[['column1', 'column2']].
- DataFrame supports filtering, grouping, and aggregation for analysis.
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.