Quantcast
Channel: Active questions tagged config - Stack Overflow
Viewing all articles
Browse latest Browse all 5054

Which part should the package configuration in Python script?

$
0
0

I have few code which set the configuration for logging and package setting.

pd.set_option('display.max_columns', None)logging.getLogger("urllib3").setLevel(logging.ERROR)

Where should I put these into the script (under import, under if __name__ == "__main__", etc) or can I create a configuration file for setting configuration?

import pybitimport pandas as pddef get_data():    # get data from bybit packagedef data_cleaning(data):    # using pandas for cleaning the dataif __name__ == "__main__":    data = get_data()    cleaned_data = data_cleaning(data)

Viewing all articles
Browse latest Browse all 5054

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>