filter df for column value 22starts 22 with pattern

Solutions on MaxInterview for filter df for column value 22starts 22 with pattern by the best coders in the world

showing results for - "filter df for column value 22starts 22 with pattern"
Adrián
15 Sep 2019
1#filter df for column value "starts" with pattern
2
3# importing pandas module  
4import pandas as pd 
5  
6# reading csv file from url  
7data = pd.read_csv("https://media.geeksforgeeks.org/wp-content/uploads/nba.csv") 
8  
9# String to be searched in start of string  
10search ="G"
11  
12# boolean series returned with False at place of NaN 
13bool_series = data["College"].str.startswith(search, na = False) 
14  
15# displaying filtered dataframe 
16data[bool_series]