Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

pd.loc

>>> df = pd.DataFrame([[1, 2], [4, 5], [7, 8]],
...      index=['cobra', 'viper', 'sidewinder'],
...      columns=['max_speed', 'shield'])
>>> df
            max_speed  shield
cobra               1       2
viper               4       5
sidewinder          7       8

>>> df.loc[['viper', 'sidewinder']]
            max_speed  shield
viper               4       5
sidewinder          7       8
Comment

PREVIOUS NEXT
Code Example
Python :: how to combine two lists in one python 
Python :: facebook python 
Python :: null=true django 
Python :: find rules of decision tree python 
Python :: unpersist cache pyspark 
Python :: how to calculate numbers with two zeros in python 
Python :: show only integer values matplotlib 
Python :: blender python get current filename 
Python :: increment dic with for loop 
Python :: python Python Program to Catch Multiple Exceptions in One Line 
Python :: how to make a window with tkinter 
Python :: stack widgets in tkinter 
Python :: maya python override color rgb 
Python :: list dictionary to json file python with tab 
Python :: pandas to_csv hebrew 
Python :: Python how to use __add__ 
Python :: python text recognition 
Python :: unable to import flask pylint 
Python :: range python start at 1 
Python :: remove hh:mm:ss from pandas dataframe column 
Python :: subprocess the system cannot find the file specifie 
Python :: unity python 
Python :: python read file between two strings 
Python :: python send image client 
Python :: upload folder to s3 bucket python 
Python :: how to input sentence in python 
Python :: insert value in string python 
Python :: Power Crisis 
Python :: python system performance 
Python :: set difference in multidimensional array numpy 
ADD CONTENT
Topic
Content
Source link
Name
9+9 =