I just do this 

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns

path_train="data/train.csv"
train=pd.read_csv(path_train)
path_test="data/test.csv"
test=pd.read_csv(path_test)
print('Train shape {}'.format(train.shape))
print('Test shape {}'.format(test.shape))




pd.set_option('display.max_columns',None)



train.head()


<div>
<style scoped>
    .dataframe tbody tr th:only-of-type {
        vertical-align: middle;
    }

    .dataframe tbody tr th {
        vertical-align: top;
    }

    .dataframe thead th {
        text-align: right;
    }
</style>
<table border="1" class="dataframe">
  <thead>
    <tr style="text-align: right;">
      <th></th>
      <th>state</th>
      <th>account_length</th>
      <th>area_code</th>
      <th>international_plan</th>
      <th>voice_mail_plan</th>
      <th>number_vmail_messages</th>
      <th>total_day_minutes</th>
      <th>total_day_calls</th>
      <th>total_day_charge</th>
      <th>total_eve_minutes</th>
      <th>total_eve_calls</th>
      <th>total_eve_charge</th>
      <th>total_night_minutes</th>
      <th>total_night_calls</th>
      <th>total_night_charge</th>
      <th>total_intl_minutes</th>
      <th>total_intl_calls</th>
      <th>total_intl_charge</th>
      <th>number_customer_service_calls</th>
      <th>churn</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th>0</th>
      <td>OH</td>
      <td>107</td>
      <td>area_code_415</td>
      <td>no</td>
      <td>yes</td>
      <td>26</td>
      <td>161.6</td>
      <td>123</td>
      <td>27.47</td>
      <td>195.5</td>
      <td>103</td>
      <td>16.62</td>
      <td>254.4</td>
      <td>103</td>
      <td>11.45</td>
      <td>13.7</td>
      <td>3</td>
      <td>3.70</td>
      <td>1</td>
      <td>no</td>
    </tr>
    <tr>
      <th>1</th>
      <td>NJ</td>
      <td>137</td>
      <td>area_code_415</td>
      <td>no</td>
      <td>no</td>
      <td>0</td>
      <td>243.4</td>
      <td>114</td>
      <td>41.38</td>
      <td>121.2</td>
      <td>110</td>
      <td>10.30</td>
      <td>162.6</td>
      <td>104</td>
      <td>7.32</td>
      <td>12.2</td>
      <td>5</td>
      <td>3.29</td>
      <td>0</td>
      <td>no</td>
    </tr>
    <tr>
      <th>2</th>
      <td>OH</td>
      <td>84</td>
      <td>area_code_408</td>
      <td>yes</td>
      <td>no</td>
      <td>0</td>
      <td>299.4</td>
      <td>71</td>
      <td>50.90</td>
      <td>61.9</td>
      <td>88</td>
      <td>5.26</td>
      <td>196.9</td>
      <td>89</td>
      <td>8.86</td>
      <td>6.6</td>
      <td>7</td>
      <td>1.78</td>
      <td>2</td>
      <td>no</td>
    </tr>
    <tr>
      <th>3</th>
      <td>OK</td>
      <td>75</td>
      <td>area_code_415</td>
      <td>yes</td>
      <td>no</td>
      <td>0</td>
      <td>166.7</td>
      <td>113</td>
      <td>28.34</td>
      <td>148.3</td>
      <td>122</td>
      <td>12.61</td>
      <td>186.9</td>
      <td>121</td>
      <td>8.41</td>
      <td>10.1</td>
      <td>3</td>
      <td>2.73</td>
      <td>3</td>
      <td>no</td>
    </tr>
    <tr>
      <th>4</th>
      <td>MA</td>
      <td>121</td>
      <td>area_code_510</td>
      <td>no</td>
      <td>yes</td>
      <td>24</td>
      <td>218.2</td>
      <td>88</td>
      <td>37.09</td>
      <td>348.5</td>
      <td>108</td>
      <td>29.62</td>
      <td>212.6</td>
      <td>118</td>
      <td>9.57</td>
      <td>7.5</td>
      <td>7</td>
      <td>2.03</td>
      <td>3</td>
      <td>no</td>
    </tr>
  </tbody>
</table>
</div>

train.info()
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 4250 entries, 0 to 4249
Data columns (total 20 columns):
 #   Column                         Non-Null Count  Dtype  
---  ------                         --------------  -----  
 0   state                          4250 non-null   object 
 1   account_length                 4250 non-null   int64  
 2   area_code                      4250 non-null   object 
 3   international_plan             4250 non-null   object 
 4   voice_mail_plan                4250 non-null   object 
 5   number_vmail_messages          4250 non-null   int64  
 6   total_day_minutes              4250 non-null   float64
 7   total_day_calls                4250 non-null   int64  
 8   total_day_charge               4250 non-null   float64
 9   total_eve_minutes              4250 non-null   float64
 10  total_eve_calls                4250 non-null   int64  
 11  total_eve_charge               4250 non-null   float64
 12  total_night_minutes            4250 non-null   float64
 13  total_night_calls              4250 non-null   int64  
 14  total_night_charge             4250 non-null   float64
 15  total_intl_minutes             4250 non-null   float64
 16  total_intl_calls               4250 non-null   int64  
 17  total_intl_charge              4250 non-null   float64
 18  number_customer_service_calls  4250 non-null   int64  
 19  churn                          4250 non-null   object 
dtypes: float64(8), int64(7), object(5)
memory usage: 664.2+ KB
train.describe()

<div>
<style scoped>
    .dataframe tbody tr th:only-of-type {
        vertical-align: middle;
    }

    .dataframe tbody tr th {
        vertical-align: top;
    }

    .dataframe thead th {
        text-align: right;
    }
</style>
<table border="1" class="dataframe">
  <thead>
    <tr style="text-align: right;">
      <th></th>
      <th>account_length</th>
      <th>number_vmail_messages</th>
      <th>total_day_minutes</th>
      <th>total_day_calls</th>
      <th>total_day_charge</th>
      <th>total_eve_minutes</th>
      <th>total_eve_calls</th>
      <th>total_eve_charge</th>
      <th>total_night_minutes</th>
      <th>total_night_calls</th>
      <th>total_night_charge</th>
      <th>total_intl_minutes</th>
      <th>total_intl_calls</th>
      <th>total_intl_charge</th>
      <th>number_customer_service_calls</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th>count</th>
      <td>4250.000000</td>
      <td>4250.000000</td>
      <td>4250.000000</td>
      <td>4250.000000</td>
      <td>4250.000000</td>
      <td>4250.000000</td>
      <td>4250.000000</td>
      <td>4250.000000</td>
      <td>4250.000000</td>
      <td>4250.000000</td>
      <td>4250.000000</td>
      <td>4250.000000</td>
      <td>4250.000000</td>
      <td>4250.000000</td>
      <td>4250.000000</td>
    </tr>
    <tr>
      <th>mean</th>
      <td>100.236235</td>
      <td>7.631765</td>
      <td>180.259600</td>
      <td>99.907294</td>
      <td>30.644682</td>
      <td>200.173906</td>
      <td>100.176471</td>
      <td>17.015012</td>
      <td>200.527882</td>
      <td>99.839529</td>
      <td>9.023892</td>
      <td>10.256071</td>
      <td>4.426353</td>
      <td>2.769654</td>
      <td>1.559059</td>
    </tr>
    <tr>
      <th>std</th>
      <td>39.698401</td>
      <td>13.439882</td>
      <td>54.012373</td>
      <td>19.850817</td>
      <td>9.182096</td>
      <td>50.249518</td>
      <td>19.908591</td>
      <td>4.271212</td>
      <td>50.353548</td>
      <td>20.093220</td>
      <td>2.265922</td>
      <td>2.760102</td>
      <td>2.463069</td>
      <td>0.745204</td>
      <td>1.311434</td>
    </tr>
    <tr>
      <th>min</th>
      <td>1.000000</td>
      <td>0.000000</td>
      <td>0.000000</td>
      <td>0.000000</td>
      <td>0.000000</td>
      <td>0.000000</td>
      <td>0.000000</td>
      <td>0.000000</td>
      <td>0.000000</td>
      <td>0.000000</td>
      <td>0.000000</td>
      <td>0.000000</td>
      <td>0.000000</td>
      <td>0.000000</td>
      <td>0.000000</td>
    </tr>
    <tr>
      <th>25%</th>
      <td>73.000000</td>
      <td>0.000000</td>
      <td>143.325000</td>
      <td>87.000000</td>
      <td>24.365000</td>
      <td>165.925000</td>
      <td>87.000000</td>
      <td>14.102500</td>
      <td>167.225000</td>
      <td>86.000000</td>
      <td>7.522500</td>
      <td>8.500000</td>
      <td>3.000000</td>
      <td>2.300000</td>
      <td>1.000000</td>
    </tr>
    <tr>
      <th>50%</th>
      <td>100.000000</td>
      <td>0.000000</td>
      <td>180.450000</td>
      <td>100.000000</td>
      <td>30.680000</td>
      <td>200.700000</td>
      <td>100.000000</td>
      <td>17.060000</td>
      <td>200.450000</td>
      <td>100.000000</td>
      <td>9.020000</td>
      <td>10.300000</td>
      <td>4.000000</td>
      <td>2.780000</td>
      <td>1.000000</td>
    </tr>
    <tr>
      <th>75%</th>
      <td>127.000000</td>
      <td>16.000000</td>
      <td>216.200000</td>
      <td>113.000000</td>
      <td>36.750000</td>
      <td>233.775000</td>
      <td>114.000000</td>
      <td>19.867500</td>
      <td>234.700000</td>
      <td>113.000000</td>
      <td>10.560000</td>
      <td>12.000000</td>
      <td>6.000000</td>
      <td>3.240000</td>
      <td>2.000000</td>
    </tr>
    <tr>
      <th>max</th>
      <td>243.000000</td>
      <td>52.000000</td>
      <td>351.500000</td>
      <td>165.000000</td>
      <td>59.760000</td>
      <td>359.300000</td>
      <td>170.000000</td>
      <td>30.540000</td>
      <td>395.000000</td>
      <td>175.000000</td>
      <td>17.770000</td>
      <td>20.000000</td>
      <td>20.000000</td>
      <td>5.400000</td>
      <td>9.000000</td>
    </tr>
  </tbody>
</table>
</div>

Q- now using functional programming i want to build a function and resecive this data frame and return a list of categoricals varible from it oky 

Q- give me the pesudoCode and the actual python code 

def get_categorical_variables(df):
    """
    Returns a list of categorical variables from a given DataFrame


    Args :
    df (pandas.DataFrame): The input DataFrame


    Returns:
    list : A list of column names that are categorical


    """
    return [col for col in df.columns if df[col].dtype=='object' ]
categorical_var=get_categorical_variables(train)
print('List of categorical variables {}'.format(categorical_var))



List of categorical variables ['state', 'area_code', 'international_plan', 'voice_mail_plan', 'churn']

Now i want to dislay so visualzation to expriment and asnwer some question realated to this domain ?
Can you give 3 suggest one : using the question and how to answer them