Titanic 🚀
df['AgeGroup'] = pd.cut(df['Age'], bins=[0, 12, 18, 35, 60, 100], labels=['Child', 'Teen', 'Adult', 'Senior', 'Elder']) Use code with caution. Copied to clipboard
Which format are you creating for? I can tailor the tone (educational, emotional, or viral) further. Titanic
Lookout Frederick Fleet spotted a dark shape directly in the ship's path. He rang the warning bell three times and phoned the bridge: "Iceberg, right ahead." df['AgeGroup'] = pd
At 11:40 PM on April 14, 1912, the temperature had dropped to near freezing. The sea was eerily calm—a "glassy calm"—which made icebergs difficult to spot because there were no breaking waves at their bases. df['AgeGroup'] = pd.cut(df['Age']