File size: 2,254 Bytes
92dfcd1
 
 
 
 
 
 
 
 
cded65c
 
 
 
6e4a22e
cded65c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
---
license: mit
tags:
- tabular
- classification
- water-quality
pretty_name: "Water Potability"
---

# Water Potability Dataset

## Overview

This dataset contains water quality metrics from 2,556 different water bodies. The primary purpose of this dataset is to serve as a basis for a binary classification problem: predicting whether water is **potable** (safe for human consumption) based on its chemical and physical properties.

---

## Features

The dataset consists of 10 columns. The first 9 are features, and the last one is the target variable.

- **ph**: The pH level of the water, ranging from 0 to 14. This is a crucial measure of how acidic or alkaline water is.
- **Hardness**: A measure of the concentration of dissolved minerals, primarily calcium and magnesium.
- **Solids**: The total amount of dissolved solids (TDS) in the water, measured in milligrams per liter (mg/L).
- **Chloramines**: The concentration of chloramines in the water, measured in mg/L. These are disinfectants used to treat drinking water.
- **Sulfate**: The concentration of sulfate dissolved in the water, measured in mg/L.
- **Conductivity**: The electrical conductivity of the water, measured in microSiemens per centimeter (μS/cm). It's an indicator of the amount of dissolved ionic substances.
- **Organic_carbon**: The amount of organic carbon in the water, measured in mg/L.
- **Trihalomethanes**: The concentration of Trihalomethanes in the water, measured in micrograms per liter (μg/L). These are byproducts of water disinfection.
- **Turbidity**: A measure of the cloudiness or haziness of the water caused by suspended particles, measured in Nephelometric Turbidity Units (NTU).

---

## Target Variable

- **Potability**: This is the column you want to predict.
  - **1**: The water is potable (safe to drink).
  - **0**: The water is not potable.

---

## How to Use

You can easily load and explore this dataset using a library like `pandas` in Python.

```python
import pandas as pd

# Load the dataset from the CSV file
df = pd.read_csv('water_potability.csv')

# Display the first 5 rows
print(df.head())

# Get a summary of the dataset
print(df.info())

# Check the distribution of the target variable
print(df['Potability'].value_counts())