Update README.md

Fix typo: from "ealier" to "earlier"
Fix format: From **Dropping duplicates: `drop_duplicates`: `drop_duplicates` to **Dropping duplicates: `drop_duplicates`:**
pull/289/head
Frederick Legaspi 3 years ago committed by GitHub
parent b1a9aff9cf
commit 92847d9e81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -265,7 +265,7 @@ Notice that when a previous value is not available for forward-filling, the null
In addition to missing data, you will often encounter duplicated data in real-world datasets. Fortunately, `pandas` provides an easy means of detecting and removing duplicate entries. In addition to missing data, you will often encounter duplicated data in real-world datasets. Fortunately, `pandas` provides an easy means of detecting and removing duplicate entries.
- **Identifying duplicates: `duplicated`**: You can easily spot duplicate values using the `duplicated` method in pandas, which returns a Boolean mask indicating whether an entry in a `DataFrame` is a duplicate of an ealier one. Let's create another example `DataFrame` to see this in action. - **Identifying duplicates: `duplicated`**: You can easily spot duplicate values using the `duplicated` method in pandas, which returns a Boolean mask indicating whether an entry in a `DataFrame` is a duplicate of an earlier one. Let's create another example `DataFrame` to see this in action.
```python ```python
example4 = pd.DataFrame({'letters': ['A','B'] * 2 + ['B'], example4 = pd.DataFrame({'letters': ['A','B'] * 2 + ['B'],
'numbers': [1, 2, 1, 3, 3]}) 'numbers': [1, 2, 1, 3, 3]})
@ -290,7 +290,7 @@ example4.duplicated()
4 True 4 True
dtype: bool dtype: bool
``` ```
- **Dropping duplicates: `drop_duplicates`: `drop_duplicates` simply returns a copy of the data for which all of the `duplicated` values are `False`: - **Dropping duplicates: `drop_duplicates`:** simply returns a copy of the data for which all of the `duplicated` values are `False`:
```python ```python
example4.drop_duplicates() example4.drop_duplicates()
``` ```

Loading…
Cancel
Save