# Write a Pandas program to create a Pivot table and compute survival totals of all classes along each group.  
 import pandas as pd
import numpy as np
df = pd.read_csv('titanic.csv')
result = df.pivot_table('survived', index='sex', columns='class', margins=True)
print(result)
