Horje
df.loc Code Example
pandas loc for list
df.loc[df['channel'].isin(['sale','fullprice'])]
df.loc
# Getting values on a DataFrame with an index that has interger "labels"
df = pd.DataFrame([[1, 2], [4, 5], [7, 8]],
...      index=[7, 8, 9], columns=['max_speed', 'shield'])
>>> df
   max_speed  shield
7          1       2
8          4       5
9          7       8

# the integer is interpreted as "label" but NOT an "interger position along the index"
>>> df.loc[7:9]
   max_speed  shield
7          1       2
8          4       5
9          7       8




Python

Related
if user_answer==answer: ecpeted index erroe pythin fx Code Example if user_answer==answer: ecpeted index erroe pythin fx Code Example
df select custom index Code Example df select custom index Code Example
goto statement in python geeksforgeeks Code Example goto statement in python geeksforgeeks Code Example
List Comprehension iteration Code Example List Comprehension iteration Code Example
python closing socket good way Code Example python closing socket good way Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7