@@ -321,15 +321,18 @@ We'll talk a bit more about what the different formats mean in a different lesso
321321There are many ways to summarize and access the data stored in DataFrames,
322322using attributes and methods provided by the DataFrame object.
323323
324- To access an attribute, use the DataFrame object name followed by the attribute
325- name ` df_object.attribute ` . Using the DataFrame ` surveys_df ` and attribute
326- ` columns ` , an index of all the column names in the DataFrame can be accessed
327- with ` surveys_df.columns ` .
328-
329- Methods are called in a similar fashion using the syntax ` df_object.method() ` .
330- As an example, ` surveys_df.head() ` gets the first few rows in the DataFrame
331- ` surveys_df ` using ** the ` head() ` method** . With a method, we can supply extra
332- information in the parens to control behaviour.
324+ Attributes are features of an object. For example, the ` shape ` attribute will output
325+ the size (the number of rows and columns) of an object. To access an attribute,
326+ use the DataFrame object name followed by the attribute name ` df_object.attribute ` .
327+ For example, using the DataFrame ` surveys_df ` and attribute ` columns ` , an index
328+ of all the column names in the DataFrame can be accessed with ` surveys_df.columns ` .
329+
330+ Methods are like functions, but they only work on particular kinds of objects. As
331+ an example, ** the ` head() ` method** works on DataFrames. Methods are called in a
332+ similar fashion to attributes, using the syntax ` df_object.method() ` . Using
333+ ` surveys_df.head() ` gets the first few rows in the DataFrame ` surveys_df `
334+ using ** the ` head() ` method** . With a method, we can supply extra information
335+ in the parens to control behaviour.
333336
334337Let's look at the data using these.
335338
0 commit comments