File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -95,7 +95,10 @@ type(surveys_df)
9595~~~
9696{: .language-python}
9797
98- ** OUTPUT:** ` pandas.core.frame.DataFrame `
98+ ~~~
99+ pandas.core.frame.DataFrame
100+ ~~~
101+ {: .output}
99102
100103Next, let's look at the structure of our surveys data. In pandas, we can check
101104the type of one column in a DataFrame using the syntax
@@ -106,7 +109,10 @@ surveys_df['sex'].dtype
106109~~~
107110{: .language-python}
108111
109- ** OUTPUT:** ` dtype('O') `
112+ ~~~
113+ dtype('O')
114+ ~~~
115+ {: .output}
110116
111117A type 'O' just stands for "object" which in Pandas' world is a string
112118(text).
@@ -116,7 +122,10 @@ surveys_df['record_id'].dtype
116122~~~
117123{: .language-python}
118124
119- ** OUTPUT:** ` dtype('int64') `
125+ ~~~
126+ dtype('int64')
127+ ~~~
128+ {: .output}
120129
121130The type ` int64 ` tells us that Python is storing each value within this column
122131as a 64 bit integer. We can use the ` dat.dtypes ` command to view the data type
@@ -208,8 +217,10 @@ surveys_df['record_id'].dtype
208217~~~
209218{: .language-python}
210219
211- ** OUTPUT:** ` dtype('float64') `
212-
220+ ~~~
221+ dtype('float64')
222+ ~~~
223+ {: .output}
213224
214225> ## Challenge - Changing Types
215226>
You can’t perform that action at this time.
0 commit comments