guest_blog — September 5, 2020
Beginner Data Exploration Pandas Programming Python


Indexing and Selecting Data

  • Enables automatic and explicit data alignment.
  • Allows intuitive getting and setting of subsets of the data set.


The query() Method

#creating dataframe of 10 rows and 3 columns
df4 = pd.DataFrame(np.random.rand(10, 3), columns=list('abc'))

Image for post

Image for post

#with query()
df4.query('(x < b) & (b < c)')

Image for post

  • drop_duplicates: removes duplicate rows.
df5 = pd.DataFrame({'a': ['one', 'one', 'two', 'two', 'two'],
                    'b': ['x', 'y', 'x', 'y', 'x'],
                    'c': np.random.randn(5)})

Image for post


Image for post


Image for post

  1. Interesting 10 Machine Learning and Data Science Projects with Datasets
  2. Basic Understanding of NLP With Python


About the Author


Amit Chauhan

I am a Research Scholar and a technical person with 4-year experience in R&D Electronics. Data Science enthusiastic

Leave a Reply Your email address will not be published. Required fields are marked *