Like many other programming languages, Python works well with JavaScript Object Notation (JSON) data. It can pull this data in from a few sources and work with it like any other file. This is helpful ...
前回は、PythonのloggingモジュールでLoggerオブジェクトを使ったより高度な設定方法についてご紹介しました。 前回までに、basicConfig()を使った基本的な設定方法と、Loggerオブジェクトを使った複数のハンドラーを設定する方法についてご紹介しました。
もっといい方法があるよとChatGPTに教わったので、教わった内容を共有します。 私はデータ分析業務に携わってますが、たま~に変なデータ形式のファイルに遭遇します。こういう変なデータにあたってしまうとデータの成型に時間を要してしまうんですよね。
Hello there! 👋 I'm Luca, a BI Developer with a passion for all things data, Proficient in Python, SQL and Power BI ...
#!/usr/bin/python # pprint-json.py import json import sys import pprint # http://stackoverflow.com/questions/5203105/printing-a-utf-8-encoded-string # and http ...
Coded and tested on Python 2.7 and 2.6 (Ubuntu 16.04, macOS Sierra 10.12.5, Centos 6.X) and syntax will need fix for Python 3.x - will do later. $ cat example-chef ...