Unconverted Data Remains Error While Using strptime in Python

python

To start off, screw the unconverted data remains error while using strptime in Python 2.x or 3.x. Of the many Python errors I’ve gotten this has to be one of the more vague ones. That being said, I do hate working with times and dates. Regardless, here’s your solution. My Setup Python 3.xmacOS Recreating the … Read moreUnconverted Data Remains Error While Using strptime in Python

Dropping Duplicates From A Pandas DataFrame

python

Dropping duplicates from a Pandas DataFrame came into my purview when I noticed a script which contained a ton of networking was sloooooooow. Unfortunately, the endpoint didn’t support asynchronous API calls, so I was stuck getting the job done the ol’ fashioned way. My Setup Python 3.xmacOS The Problem I had tons of data in … Read moreDropping Duplicates From A Pandas DataFrame

Making a Python Wrapper for your REST API

python

Need help making a Python Wrapper for your REST API? Python is my personal favorite programming language. So when somebody approaches me with a problem that involves a REST API, I immediately go to Python. That being said, calling REST API’s can unfortunately be a little ugly in the language. I’ll show you how to … Read moreMaking a Python Wrapper for your REST API

‘python’ is not recognized as an internal or external command, operable program or batch file

python

So you got the ‘PYTHON’ IS NOT RECOGNIZED AS AN INTERNAL OR EXTERNAL COMMAND, OPERABLE PROGRAM OR BATCH FILE error on your windows machine when trying to set up a new workstation? Maybe you’re new to Python and this is your first error ever? Regardless, it’s cutting into valuable procrastination time so let’s get er’ … Read more‘python’ is not recognized as an internal or external command, operable program or batch file

TypeError: String Indices Must be Integers

python

I’m guessing you’re here because Python threw a, ” TypeError: string indices must be integers”. I got this error after successfully hitting a REST endpoint using the requests Python library and attempting to access one of the responses elements. If you need an example of hitting an endpoint, try this out. It shouldn’t be much different. … Read moreTypeError: String Indices Must be Integers

‘Tuple’ Object Has No Attribute ‘Replace’

python

I got the, ” ‘Tuple’ Object Has No Attribute ‘Replace’ ” error when trying to rename some file paths using python 2.x. This is because the os.walk(dst) returns an array of tuples. Accessing the first element in this tuple can solve the error. I was initially doing the following. dir in this case is the … Read more‘Tuple’ Object Has No Attribute ‘Replace’