# Write a Pandas program to create a Pivot table and find survival rate by gender on various classes.  
 import pandas as pd
import numpy as np
df = pd.read_csv('titanic.csv')
result = df.pivot_table('survived', index='sex', columns='class')
print(result)
