I'm experiencing some trouble importing the below libraries displayed within the below markdown, which is required for a Python sentiment analysis via Twitter:
# General:
import tweepy # To consume Twitter's API
import pandas as pd # To handle data
import numpy as np # For number computing
# For plotting and visualization:
from IPython.display import display
import matplotlib.pyplot as plt
import seaborn as sns
%matplotlib
Although somewhat new to Python3/pip, as a Rubyist/elephpant, I'm certainly no stranger to homebrew- after commenting-out %matplotlib the file apparently imports all libraries listed except%matplotlib, which appears to be the Jupyter invocation- so how do I correctly load the import for %matplotlib in standard Python (3.6.2) in order to avoid the below error? Is there an alternative approach?
File "toolbox.py", line 10
%matplotlib
^
SyntaxError: invalid syntax
Thank you!
%matplotlibis an IPython magic. That's for interactive use.%matplotlibor that andimport matplotlib.pyplot as pltaltogether?