Question: Here is my code if refresh my page its logout or also while when I change menu bar its also logout why?

```
    <?php
$userid = ($_POST['userid']);
$pswd = ($_POST['pswd']);
$conn = oci_connect('user', 'pswrd', 'db');
$query = "SELECT userid, pswd FROM staff
WHERE userid=:userid AND pswd=:pswd";
$stmt = oci_parse($conn, $query);
oci_bind_by_name($stmt, ':userid', $userid, 8);
oci_bind_by_name($stmt, ':pswd', $pswd, 32);
oci_execute($stmt);
list($userid, $pswd) = oci_fetch_array($stmt, OCI_NUM);
if ($userid != "" && $pswd !="")
{
$_SESSION['userid'] = $userid;
echo " logged in sucessfully!!!...";
}
else {
    echo"you are not logged in ";
    }
?>

```

Answer: 
```
import csv 
from collections import namedtuple

with open('DataAnalizada.csv', 'rb') as f: 
    reader = csv.reader(f)
    first_col = reader.next()
    header = namedtuple('header', first_col)
    data = {}
    for val in reader:
         get_ = header(*val)
         if get_.Analisis == 'Estable':
             get_data = (get_.Cliente, get_.Fecha)
             if get_data in data:
                 get_list = data[get_data]
                 get_list.append(val)
             else:
                  data.setdefault(get_data, [])            
    with open('DataAnalizada_new.csv', 'wb+') as filename:
        header = ['Cliente','Fecha','Analisis']
        writer = csv.writer(filename)
        writer.writerow(header)
        for val in data.keys():
            writer.writerow(val + ["Stable: The client's performance was Stable"])

```
The Pandas package has the tools you need. However I would recommend starting with [scipy](https://www.scipy.org/about.html "scipy") and [anaconda](https://www.anaconda.com/download/#linux "anaconda") since I found installing Pandas on its own to be quite difficult.