Python Forum
%matplotlib inline , invalid syntax
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
%matplotlib inline , invalid syntax
#1
Dear All

I'm trying to use %matplotlib inline to show the heatmap but i'm getting an error "Invalid syntax", can any body help to solve the problem, here is my code:

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

train = pd.read_csv('titanic_train.csv')

train.head(10)

sns.heatmap(train.isnull(), yticklabels=False, cbar=False, cmap='viridis')
Reply


Messages In This Thread
%matplotlib inline , invalid syntax - by yamoon - Jul-12-2018, 06:56 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to find what is causing the unboundlocalerror 'crumb' and invalid syntax error? JonathanBanks 1 2,315 Jul-28-2020, 11:46 AM
Last Post: Yoriz
  SyntaxError: invalid syntax Truman 3 2,964 Mar-10-2020, 03:16 PM
Last Post: Truman
  list comprehension invalid syntax mcgrim 1 4,700 Jun-12-2019, 08:28 PM
Last Post: Yoriz
  Help: how to deal with a invalid Matplotlib date value when use {gca()} pythopen 2 31,825 Oct-18-2018, 08:37 PM
Last Post: pythopen
  Misterious invalid syntax Galedon 3 3,487 Mar-30-2018, 03:49 PM
Last Post: Galedon

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020