I’m importing pandas and it continues to throw 7 DEBUG messages. It’s happening in JupyterLab and pythonanywhere. It does not appear when I comment out the pandas import
I tried to mute them using: warnings.filterwarnings(“ignore”), to no avail. Tried “from pandas import pandas as pd” to try and avoid any further import, etc.
JavaScript
x
12
12
1
from bs4 import BeautifulSoup
2
from oauth2client.service_account import ServiceAccountCredentials
3
from yahoo_oauth import OAuth2
4
from datetime import date, timedelta
5
from email.mime.multipart import MIMEMultipart
6
from email.mime.text import MIMEText
7
8
import gspread
9
import smtplib
10
import time
11
import pandas
12
JavaScript
1
8
1
[2019-06-04 10:01:56,097 DEBUG] [matplotlib.__init__.wrapper] $HOME=/home/
2
[2019-06-04 10:01:56,104 DEBUG] [matplotlib.__init__.wrapper] matplotlib data path /usr/local/lib/python2.7/dist-packages/matplotlib/mpl-data
3
[2019-06-04 10:01:56,111 DEBUG] [matplotlib.__init__.rc_params_from_file] loaded rc file /usr/local/lib/python2.7/dist-packages/matplotlib/mpl-data/matplotlibrc
4
[2019-06-04 10:01:56,126 DEBUG] [matplotlib.__init__.<module>] matplotlib version 2.2.2
5
[2019-06-04 10:01:56,126 DEBUG] [matplotlib.__init__.<module>] interactive is False
6
[2019-06-04 10:01:56,127 DEBUG] [matplotlib.__init__.<module>] platform is linux2
7
[2019-06-04 10:01:56,127 DEBUG] [matplotlib.__init__.<module>] loaded modules: ['requests.Cookie', 'pandas._libs.numpy',
8
… goes on for 100+ lines further
Advertisement
Answer
Try:
JavaScript
1
4
1
import logging
2
logging.basicConfig(level=logging.INFO)
3
import pandas
4
See https://docs.python.org/3/howto/logging.html#logging-basic-tutorial for more info on the logging module. It looks like something you are importing is setting the log level for you (or you are setting it yourself)