Changes
Jump to navigation
Jump to search
← Older edit
Newer edit →
Pandas
(edit)
Revision as of 10:04, 21 May 2019
45 bytes added
,
10:04, 21 May 2019
m
→Select 1 row
Line 26:
Line 26:
<syntaxhighlight lang="python3">
<syntaxhighlight lang="python3">
df.iloc[[1]]
df.iloc[[1]]
+
df.loc[0]
+
df.iloc[-1] == df.loc[df.shape[0]-1]
</syntaxhighlight>
</syntaxhighlight>
Line 36:
Line 38:
</syntaxhighlight>
</syntaxhighlight>
−
=== Select multiple columns ===
+
===Select multiple columns===
<syntaxhighlight lang="python3">
<syntaxhighlight lang="python3">
df[['column1', 'column2', 'column3']]
df[['column1', 'column2', 'column3']]
Rafahsolis
Bureaucrats
,
Administrators
2,306
edits
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
Variants
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
Special pages
Printable version