Gang Of Coders
Home
About Us
Contact Us
All Python 2.7 Solutions on Gang of Coders
Total of 429 Python 2.7 Solutions
Keep Jupyter notebook running after closing browser tab
Python 2.7
Ipython Notebook
Jupyter
Using multiple Python engines (32Bit/64bit and 2.7/3.5)
Python
Python 3.x
Python 2.7
Anaconda
Conda
Find "one letter that appears twice" in a string
Python
Regex
Python 2.7
Python 2.7 installing opencv via pip (virtual environment)
Python 2.7
Opencv
Pip
Virtualenv
Spell Checker for Python
Python
Python 2.7
Nltk
Spell Checking
Pyenchant
Python 2 --> 3: object of type 'zip' has no len()
Python 2.7
Python 3.x
Switch between python 2.7 and python 3.5 on Mac OS X
Python
Macos
Python 2.7
Python 3.x
Terminal
What does !r do in str() and repr()?
Python
String
Python 2.7
Formatting
Repr
Difference between scikit-learn and sklearn
Python
Python 2.7
Scikit Learn
Get hard disk size in Python
Python
Macos
Python 2.7
Hard Drive
Why does `None is None is None` return True?
Python
Python 3.x
Python 2.7
shutil.rmtree() clarification
Python
Python 2.7
Shutil
Check if object is a number or boolean
Python
Python 2.7
Why is string's startswith slower than in?
Python
Python 2.7
Cpython
Python Internals
Startswith
How to check existence of a folder and then remove it?
Python
Linux
Python 2.7
Rmdir
string encoding and decoding?
Python
Python 2.7
Flask broken pipe with requests
Python
Ubuntu
Python 2.7
Flask
Insert a Pandas Dataframe into mongodb using PyMongo
Python
Mongodb
Python 2.7
Pandas
Pymongo
How references to variables are resolved in Python
Python
Variables
Python 2.7
Scope
Python Internals
IndexError: tuple index out of range ----- Python
Python
Python 2.7
Mysql Python
how to find current day is weekday or weekends in Python?
Python
Python 2.7
Python 3.x
Accessing attributes on literals work on all types, but not `int`; why?
Python
Python 2.7
Python 3.x
Language Lawyer
Python scikit learn MLPClassifier "hidden_layer_sizes"
Python
Python 2.7
Scikit Learn
Neural Network
Is there a need to close files that have no reference to them?
Python
Python 2.7
File
Using openCV to overlay transparent image onto another image
Python
Python 2.7
Opencv
How to use collections.abc from both Python 3.8+ and Python 2.7
Python
Python 3.x
Python 2.7
TypeError: 'int' object is not subscriptable
Python
Python 2.7
Could not find a version that satisfies the requirement tensorflow
Python
Python 3.x
Python 2.7
Tensorflow
Pip
In python selenium, how does one find the visibility of an element?
Python
Python 2.7
Selenium Webdriver
How to perform arithmetic operation on a date in Python?
Python
Datetime
Python 2.7
Unknown error: Chrome failed to start: exited abnormally
Python
Python 2.7
Testing
Selenium Chromedriver
ImportError: No module named enum
Python
Python 2.7
Anaconda
Spyder
Windows 7-X64
Python Pip install Error: Unable to find vcvarsall.bat. Tried all solutions
Python
Windows
Visual Studio
Python 2.7
Pip
How to find the date n days ago in Python?
Python 2.7
Date
Datetime
Timedelta
Python: how to capture image from webcam on click using OpenCV
Python
Python 2.7
Opencv
How do I restart airflow webserver?
Python 2.7
Airflow
Python Requests - No connection adapters
Python
Python 2.7
Python Requests
The 'pip==7.1.0' distribution was not found and is required by the application
Python
Python 2.7
Ubuntu
Pip
ImportError: Could not import the Python Imaging Library (PIL) required to load image files on tensorflow
Python
Python 2.7
Tensorflow
Python Imaging-Library
Pillow
What is inf and nan?
Python
Python 2.7
How to extract dictionary single key-value pair in variables
Python
Python 2.7
Dictionary
Iterable Unpacking
Tensorflow python : Accessing individual elements in a tensor
Python
Python 2.7
Tensorflow
Append an empty row in dataframe using pandas
Python
Python 2.7
Pandas
Divide a dictionary into variables
Python
Python 2.7
dict() vs { } in python which is better?
Python
Python 2.7
When calling super() in a derived class, can I pass in self.__class__?
Python
Python 2.7
Super
Scrapy get request url in parse
Python 2.7
Scrapy
Scrapyd
Convert XLSX to CSV correctly using python
Python
Excel
Python 2.7
Csv
Reading csv zipped files in python
Python 2.7
Csv
Zip
Patch pyopenssl for sslv3 issue
Python 2.7
Debian
Pip
Pyopenssl
Urllib3
BdbQuit raised when debugging Python with pdb
Python
Python 2.7
Debugging
Pdb
Ipdb
iterate through all rows in specific column openpyxl
Excel
Python 2.7
Openpyxl
vscode import error for python module
Python 2.7
Visual Studio-Code
Vscode Settings
Vscode Tasks
Create 3D array using Python
Python
Arrays
Python 2.7
Multidimensional Array
How to get an array in Django posted via Ajax
Ajax
Django
Jquery
Python 2.7
How can I check if key exists in list of dicts in python?
Python
Python 2.7
global variable warning in python
Python
Python 2.7
Global
Python 2.6
Python MySQLdb TypeError: not all arguments converted during string formatting
Python
Python 2.7
What is the use of buffering in python's built-in open() function?
Python
Python 2.7
getattr and setattr on nested subobjects / chained properties?
Python
Python 2.7
Recursion
Attributes
Setattr
How to pass a list as an environment variable?
Python
Python 2.7
matplotlib: RuntimeError: Python is not installed as a framework
Python
Macos
Python 2.7
Matplotlib
Python 2.7 : LookupError: unknown encoding: cp65001
Python
Python 2.7
Encoding
Pip
how to get return response from AWS Lambda function
Python 2.7
Aws Lambda
PDB - stepping out of a function
Python
Python 2.7
Pdb
Ipdb
Why is the size of 2⁶³ 36 bytes, but 2⁶³-1 is only 24 bytes?
Python
Python 2.7
Cpython
Python Internals
Unable to install grpcio using pip install grpcio
Python 2.7
Build
Grpc
Remove list from list in Python
Python
List
Python 2.7
Python OrderedDict not keeping element order
Python
Python 2.7
Ordereddictionary
tempfile.TemporaryDirectory context manager in Python 2.7
Python
Python 2.7
With Statement
Temp
pip install gives error: Unable to find vcvarsall.bat
Python
Python 2.7
Pip
Zipline
Test if an internet connection is present in python
Python
Python 2.7
Networking
Getting a sublist of a Python list, with the given indices?
Python
List
Python 2.7
Installing h5py on an Ubuntu server
Python
Python 2.7
Installation
H5py
How to get PID by process name?
Python
Linux
Python 2.7
Pid
How to connect to a remote PostgreSQL database through SSL with Python
Python
Postgresql
Python 2.7
Ssl
Python 3.6
Python 3 urllib produces TypeError: POST data should be bytes or an iterable of bytes. It cannot be of type str
Python
Python 2.7
Python 3.x
Urllib2
Urllib
converting currency with $ to numbers in Python pandas
Python
Python 2.7
Pandas
How to choose bins in matplotlib histogram
Python
Python 2.7
Matplotlib
In Python, how do you convert a `datetime` object to seconds?
Python
Python 2.7
What is the difference between json.load() and json.loads() functions
Python
Json
Python 2.7
Skip the headers when editing a csv file using Python
Python
Python 2.7
Csv
Using both Python 2.x and Python 3.x in IPython Notebook
Python
Python 2.7
Python 3.x
Ipython
Ipython Notebook
HTTP requests and JSON parsing in Python
Python
Json
Python 2.7
What is the result of % in Python?
Python
Python 2.7
Syntax
Operators
Modulo
How can I read inputs as numbers?
Python
Python 3.x
Python 2.7
Input
Int
input() error - NameError: name '...' is not defined
Python
Python 2.7
Input
Nameerror
Split a python list into other "sublists" i.e smaller lists
Python
Python 2.7
Why isn't my Pandas 'apply' function referencing multiple columns working?
Python
Python 2.7
Pandas
Dataframe
Apply
How to display pandas DataFrame of floats using a format string for columns?
Python
Python 2.7
Pandas
Ipython
Dataframe
How to convert a string to utf-8 in Python
Python
Python 2.7
Unicode
Utf 8
Writing a Python list of lists to a csv file
Python
File
Csv
File Io
Python 2.7
sklearn error ValueError: Input contains NaN, infinity or a value too large for dtype('float64')
Python
Python 2.7
Scikit Learn
Valueerror
Python - Extracting and Saving Video Frames
Python
Python 2.7
Opencv
AttributeError: 'datetime' module has no attribute 'strptime'
Python
Class
Python 2.7
Python 'If not' syntax
Python
Python 2.7
Python UTC datetime object's ISO format doesn't include Z (Zulu or Zero offset)
Python
Python 2.7
Datetime
Timestamp
Iso8601
How to use pip with Python 3.x alongside Python 2.x
Python
Python 3.x
Python 2.7
Pip
What is a good practice to check if an environmental variable exists or not?
Python
Python 2.7
Python 3.x
If Statement
Environment Variables
"OSError: [Errno 1] Operation not permitted" when installing Scrapy in OSX 10.11 (El Capitan) (System Integrity Protection)
Python
Macos
Python 2.7
Scrapy
What do ellipsis [...] mean in a list?
Python
Python 2.7
Python 3.x
List
Ellipsis
Why is early return slower than else?
Python
Optimization
Python 2.7
How to get the latest file in a folder?
Python
Python 3.x
Python 2.7
ImportError: numpy.core.multiarray failed to import
Python
Python 2.7
Numpy
Opencv
AttributeError("'str' object has no attribute 'read'")
Python
Python 2.7
Urllib2
Attributeerror
What does from __future__ import absolute_import actually do?
Python
Python 2.7
Python Import
Python 2.5
How do you create nested dict in Python?
Python
Python 2.7
Dictionary
Mapping
Nested
If list index exists, do X
Python
Python 2.7
Zip lists in Python
Python
Python 2.7
No such file or directory "limits.h" when installing Pillow on Alpine Linux
Python
Linux
Python 2.7
Alpine
pip or pip3 to install packages for Python 3?
Python
Macos
Python 2.7
Python 3.x
Pip
Backporting Python 3 open(encoding="utf-8") to Python 2
Python
Python 2.7
Python 3.x
Why are Python's 'private' methods not actually private?
Python
Python 2.7
Encapsulation
Information Hiding
Not able to install Python packages [SSL: TLSV1_ALERT_PROTOCOL_VERSION]
Python
Python 2.7
Pip
Ssl Certificate
What is the difference between json.dump() and json.dumps() in python?
Python
Json
Python 2.7
What is the most efficient way of finding all the factors of a number in Python?
Python
Algorithm
Python 2.7
Performance
Factorization
Getting attributes of a class
Python
Python 2.7
Class
Attributes
How to save and load cookies using Python + Selenium WebDriver
Python
Python 2.7
Selenium
Webdriver
Reading an Excel file in python using pandas
Python
Python 2.7
Pandas
Pip freeze vs. pip list
Python
Python 2.7
Python 3.x
Pip
How to print a string at a fixed width?
Python
Python 3.x
Python 2.7
Format
How to save traceback / sys.exc_info() values in a variable?
Python
Python 2.7
Exception
How to detect key presses?
Python
Python 2.7
Keypress
Detect
Making an API call in Python with an API that requires a bearer token
Python
Python 2.7
Curl
Ibm Cloud
Pycurl
Insert an element at a specific index in a list and return the updated list
Python
Python 2.7
List
Insert
Pelican 3.3 pelican-quickstart error "ValueError: unknown locale: UTF-8"
Python
Python 2.7
Pelican
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 13: ordinal not in range(128)
Python
Python 2.7
How to write to an existing excel file without overwriting data (using pandas)?
Python
Excel
Python 2.7
Pandas
Mocking a function to raise an Exception to test an except block
Python
Unit Testing
Python 2.7
Mocking
Python Mock
Why does using from __future__ import print_function breaks Python2-style print?
Python
Python 2.7
Loops
Vim
Python Import
How do I install PyCrypto on Windows?
Python
Windows
Python 2.7
Pycrypto
Redirecting stdout to "nothing" in python
Python
Python 2.7
Is it possible to modify variable in python that is in outer, but not global, scope?
Python
Python 2.7
Convert string to variable name in python
Python
Python 2.7
Invalid http_host header
Python
Django
Python 2.7
Http Host
Get the first element of each tuple in a list in Python
Python
Python 2.7
Syntax
Python 2.7 getting user input and manipulating as string without quotations
Python
String
Python 2.7
Python if-else short-hand
Python
Python 2.7
Ubuntu running `pip install` gives error 'The following required packages can not be built: * freetype'
Python
Ubuntu
Python 2.7
Matplotlib
Pip
Can't install via pip because of egg_info error
Django
Windows
Python 2.7
Pip
Cleanest way to get last item from Python iterator
Python
Python 3.x
Python 2.7
Iterator
What is Python buffer type for?
Python
Python 2.7
class method generates "TypeError: ... got multiple values for keyword argument ..."
Python
Class
Python 2.7
Methods
Split string using a newline delimiter with Python
Python
String
Python 2.7
How should I read a file line-by-line in Python?
Python
Python 3.x
Python 2.7
How to update Python?
Python
Python 2.7
Installation
Upgrade
Windows 7-X64
Adding Python to PATH on Windows
Python
Windows
Python 2.7
Path
Is there a recommended format for multi-line imports?
Python
Python 2.7
Pep8
error: (-215) !empty() in function detectMultiScale
Python
Python 2.7
Opencv
Image Recognition
Convert list to tuple in Python
Python
Python 2.7
Tuples
How to call Base Class's __init__ method from the child class?
Python
Python 2.7
Inheritance
Constructor
What is the right way to debug in iPython notebook?
Python
Python 2.7
Jupyter Notebook
Ipython
Pdb
Reading a huge .csv file
Python
Python 2.7
File
Csv
Strip spaces/tabs/newlines - python
Python
String
Python 2.7
Strip
RuntimeWarning: invalid value encountered in divide
Python
Python 2.7
Matplotlib
How to pip or easy_install tkinter on Windows
Python
Python 2.7
Tkinter
Pip
Easy Install
Loading a file with more than one line of JSON into Pandas
Python
Json
Python 2.7
Pandas
End of support for python 2.7?
Python
Python 3.x
Python 2.7
Python 2.x
How to unzip gz file using Python
Python
Python 2.7
Gzip
Python: Pandas pd.read_excel giving ImportError: Install xlrd >= 0.9.0 for Excel support
Python
Excel
Python 2.7
Pandas
Use curly braces to initialize a Set in Python
Python
Python 2.7
Set
Python - 'ascii' codec can't decode byte
Python
Python 2.7
Unicode
Python 2.x
Python Unicode
Python os.path.join() on a list
Python
Python 2.7
os.path
Python: How to get stdout after running os.system?
Python
Python 2.7
Stdout
Stderr
os.system
How to convert int to Enum in python?
Python
Python 2.7
Enums
Int
Type Conversion
how to update spyder on anaconda
Python
Python 2.7
Anaconda
Spyder
What is a good way to handle exceptions when trying to read a file in python?
Python
Python 2.7
Exception
File Io
How do I pass extra arguments to a Python decorator?
Python
Python 2.7
Python Decorators
How to pass dictionary items as function arguments in python?
Python
Function
Python 2.7
Dictionary
filter items in a python dictionary where keys contain a specific string
Python
Python 2.7
Dictionary
Filtering
What does an 'r' represent before a string in python?
Python
Python 2.7
How do you send a HEAD HTTP request in Python 2?
Python
Python 2.7
Http
Http Headers
Content Type
Most pythonic way to interleave two strings
Python
String
Python 2.7
Python 3.x
How can I copy a Python string?
Python
String
Python 2.7
Why do tuples take less space in memory than lists?
Python
Python 2.7
List
Tuples
Python Internals
How do I iterate through the alphabet?
Python
Python 2.7
Alphabet
Securely storing environment variables in GAE with app.yaml
Python
Google App-Engine
Python 2.7
Environment Variables
unknown error: call function result missing 'value' for Selenium Send Keys even after chromedriver upgrade
Python 2.7
Google Chrome
Selenium
Selenium Webdriver
Webdriver
Any way to properly pretty-print OrderedDict?
Python
Python 2.7
Pretty Print
Ordereddictionary
Pprint
Get exception description and stack trace which caused an exception, all as a string
Python
Python 2.7
Exception Handling
Stack Trace
Python script to do something at the same time every day
Python
Python 2.7
Scheduler
Returning boolean if set is empty
Python
Python 2.7
Download and save PDF file with Python requests module
Python
Python 2.7
Python Requests
No module named setuptools
Python
Python 2.7
setup.py
Installing Numpy on 64bit Windows 7 with Python 2.7.3
Python
Windows
Python 2.7
Numpy
How to use PyCharm to debug Scrapy projects
Python
Debugging
Python 2.7
Scrapy
Pycharm
src/lxml/etree_defs.h:9:31: fatal error: libxml/xmlversion.h: No such file or directory
Python 2.7
Lxml
Pip
pydot and graphviz error: Couldn't import dot_parser, loading of dot files will not be possible
Python
Python 2.7
Graphviz
Pydot
How to locate and insert a value in a text box (input) using Python Selenium?
Python
Python 2.7
Selenium Webdriver
Form Submit
Html Input
Dead simple example of using Multiprocessing Queue, Pool and Locking
Python
Python 2.7
Multiprocessing
AttributeError: 'module' object has no attribute 'tests'
Python
Django
Python 2.7
Python Unittest
Python Variable Declaration
Python
Python 3.x
Python 2.7
Variable Declaration
ValueError: unsupported pickle protocol: 3, python2 pickle can not load the file dumped by python 3 pickle?
Python
Python 3.x
Python 2.7
Pickle
Valueerror
Extracting text from a PDF file using PDFMiner in python?
Python
Python 3.x
Python 2.7
Text Extraction
Pdfminer
Connection Timeout with Elasticsearch
Python
Python 2.7
Elasticsearch
ImportError: No module named scipy
Python
Python 2.7
Scipy
Pybrain
Is it ok having both Anacondas 2.7 and 3.5 installed in the same time?
Python
Python 3.x
Python 2.7
Anaconda
Virtualenv
Unable to install using pip install requirements.txt
Python
Python 2.7
Pip
requirements.txt
what shebang to use for python scripts run under a pyenv virtualenv
Python
Python 2.7
Pyenv
Python: import module from another directory at the same level in project hierarchy
Python
Python 2.7
Module
Path
Package
How to redirect stdout to both file and console with scripting?
Python
Python 2.7
Where should I put my own python module so that it can be imported
Python
Python 2.7
Why is parenthesis in print voluntary in Python 2.7?
Python
Printing
Python 3.x
Python 2.7
How to create a Python dictionary with double quotes as default quote format?
Python
Python 2.7
Dictionary
Python 3.x
When is hash(n) == n in Python?
Python
Python 2.7
Python 3.x
Hash
Python Internals
How to fix: "UnicodeDecodeError: 'ascii' codec can't decode byte"
Python
Python 2.7
Chinese Locale
Convert Python dictionary to JSON array
Python
Python 2.7
Can PyCharm list all of Python errors in a project?
Python
Python 2.7
Compiler Errors
Pycharm
python filter list of dictionaries based on key value
Python
List
Python 2.7
Dictionary
Anaconda site-packages
Python
Python 2.7
Pip
Anaconda
Getting only element from a single-element list in Python?
Python
Python 3.x
Python 2.7
List
Iterable Unpacking
Python 2.7: Print to File
Python
File
Python 2.7
How to register users in Django REST framework?
Django
Python 2.7
Django Models
Django Rest-Framework
How to select columns from dataframe by regex
Python
Python 2.7
Pandas
Argparse with required subparser
Python
Python 3.x
Python 2.7
Argparse
Setting Camera Parameters in OpenCV/Python
Python
Opencv
Camera
Python 2.7
Python handling socket.error: [Errno 104] Connection reset by peer
Python
Ubuntu
Python 2.7
Urllib2
python JSON only get keys in first level
Python
Json
Python 2.7
Iterator
Key
Converting Snake Case to Lower Camel Case (lowerCamelCase)
Python
Python 2.7
Recursion using yield
Python
Python 2.7
Recursion
Yield
python socket.error: [Errno 98] Address already in use
Python
Python 2.7
Python - Get Yesterday's date as a string in YYYY-MM-DD format
Python
Python 2.7
Python 3.x
Date
Datetime
Python Save to file
Python
Python 2.7
How to display the first few characters of a string in Python?
Python
Python 2.7
How do I create test and train samples from one dataframe with pandas?
Python
Python 2.7
Pandas
Dataframe
RuntimeError: module compiled against API version a but this version of numpy is 9
Python
Python 2.7
Opencv
Numpy
Python : How to parse the Body from a raw email , given that raw email does not have a "Body" tag or anything
Python
Email
Python 2.7
Mod Wsgi
Wsgi
How do I compare two strings in python if order does not matter?
Python
String
Python 2.7
String Comparison
The most efficient way to remove first N elements in a list?
Python
Performance
List
Python 2.7
Python 3.x
How should I understand the output of dis.dis?
Python
Python 2.7
ImportError: cannot import name NUMPY_MKL
Python
Windows
Python 2.7
Numpy
Scipy
pandas: find percentile stats of a given column
Python
Python 2.7
Pandas
Statistics
Converting dictionary to JSON
Python
Json
Python 2.7
Dictionary
How to join entries in a set into one string?
Python
List
Set
Python 2.7
ImportError: No module named mock
Python
Python 2.7
Python Import
Importerror
Default arguments with *args and **kwargs
Python
Python 2.7
Export from pandas to_excel without row names (index)?
Pandas
Python 2.7
Indexing
Export to-Excel
difference between find and index
Python
String
Python 2.7
Why do 3 backslashes equal 4 in a Python string?
Python
Python 2.7
python error: no module named pylab
Python
Python 2.7
Ubuntu 12.04
Matplotlib
Logging variable data with new format string
Python
Python 2.7
String Formatting
Last Key in Python Dictionary
Python
Python 2.7
Python reading from a file and saving to utf-8
Python
Python 2.7
Utf 8
str performance in python
Python
String
Performance
Python 3.x
Python 2.7
How would I stop a while loop after n amount of time?
Python
Python 2.7
Python "private" function coding convention
Python
Python 2.7
Coding Style
Naming
Conventions
pprint dictionary on multiple lines
Python
Python 2.7
Dictionary
Pprint
python pip - install from local dir
Python
Python 2.7
Understanding NumPy's Convolve
Python
Python 2.7
Numpy
Convolution
Moving Average
How to change status of JsonResponse in Django
Python
Python 3.x
Django
Python 2.7
Tastypie
Byte Array to Hex String
Python
String
Python 2.7
Bytearray
TypeError: cannot perform reduce with flexible type
Python
Python 2.7
Scikit Learn
What is the return type hint of a generator function?
Python
Python 2.7
Generator
Yield
Type Hinting
Using PIL to turn a RGB image into a pure black and white image
Python
Python Imaging-Library
Python 2.7
ConfigParser reads capital keys and make them lower case
Python
Python 2.7
Iterate enum in definition order in Python 2
Python
Python 2.7
Enums
What does x[x < 2] = 0 mean in Python?
Python
Python 2.7
Numpy
Using Keras & Tensorflow with AMD GPU
Python
Python 2.7
Opencl
Tensorflow
Keras
Easier way to enable verbose logging
Python
Python 2.7
Get time of execution of a block of code in Python 2.7
Python
Python 2.7
Profiler
Division in Python 2.7. and 3.3
Python
Python 2.7
Python 3.3
Division
How to uninstall Python 2.7 on a Mac OS X 10.6.4?
Python
Macos
Uninstallation
Python 2.7
What is different between makedirs and mkdir of os?
Python
Linux
Python 2.7
Rounding to two decimal places in Python 2.7?
Python
Python 2.7
Rounding
Python iterating through object attributes
Python
Python 2.7
Object
For Loop
How to get current time in python and break up into year, month, day, hour, minute?
Python
Python 2.7
Datetime
Time
How do I install the yaml package for Python?
Python
Python 2.7
Yaml
Pip
Pyyaml
When is it better to use zip instead of izip?
Python 2.7
Python 2.x
Itertools
Using quotation marks inside quotation marks
Python
String
Python 2.7
How to Multi-thread an Operation Within a Loop in Python
Multithreading
Python 2.7
Python Multithreading
Construct pandas DataFrame from list of tuples of (row,col,values)
Python
Python 2.7
Pandas
Pivot
How can I selectively escape percent (%) in Python strings?
Python
Escaping
Python 2.7
Get unicode code point of a character using Python
Python
Python 2.7
Unicode
Codepoint
What's the difference between __builtin__ and __builtins__?
Python
Python 3.x
Python 2.7
Language Design
Python Module
How to delete all instances of a character in a string in python?
Python
String
Python 2.7
Replace
Read from a gzip file in python
Python
Python 2.7
Gzip
How to get everything from the list except the first element using list slicing
Python
Python 2.7
List
Python 3.x
TypeError: 'int' object is not callable
Python
Python 2.7
Change figure size and figure format in matplotlib
Python
Python 2.7
Python 3.x
Matplotlib
Python Pandas add column for row-wise max value of selected columns
Python
Python 2.7
Pandas
Max
Upgrading setuptools on OSX El Capitan
Python
Macos
Python 2.7
Setuptools
How to write a Python module/package?
Python
Python 2.7
Python Module
Python: why are * and ** faster than / and sqrt()?
Python
C
Performance
Python 2.7
Python Internals
Python add leading zeroes using str.format
Python
String
Python 2.7
String Formatting
How do I run Python script using arguments in windows command line
Python
Windows
Python 2.7
Install Beautiful Soup using pip
Python
Python 2.7
Beautifulsoup
Pip
Installed Python 3 on Mac OS X but its still Python 2.7
Python
Python 2.7
Python 3.x
Osx Yosemite
importing izip from itertools module gives NameError in Python 3.x
Python
Python 3.x
Python 2.7
Itertools
Izip
How to assert that an iterable is not empty on Unittest?
Python
Python 2.7
Unit Testing
Python Unittest
Assertion
What's the difference between setup.py and setup.cfg in python projects
Python
Python 2.7
Openstack
Setuptools
Python pickle protocol choice?
Python
Python 2.7
Numpy
Pickle
Cannot use Requests-Module on AWS Lambda
Python
Python 2.7
Amazon Web-Services
Aws Lambda
How to sort a dataFrame in python pandas by two or more columns?
Python
Pandas
Python 2.7
Sorting
Data Analysis
Wrong math with Python?
Python
Python 2.7
Math
Python Checking a string's first and last character
Python
String
Python 2.7
Elasticsearch : How to delete an Index using python
Python
Python 2.7
Elasticsearch
Visual Studio Code pylint: Unable to import 'protorpc'
Python
Python 2.7
Google App-Engine
Visual Studio-Code
Protorpc
How to create a new text file using Python
Python
Python 2.7
2D list has weird behavor when trying to modify a single value
Python
Python 2.7
List
2d
Defining "boolness" of a class in python
Python
Python 2.7
Class
Boolean
Python 2.x
importing a module when the module name is in a variable
Python
Python 2.7
Import Python Script Into Another?
Python
Python 2.7
Import
Why do list comprehensions write to the loop variable, but generators don't?
Python
Python 2.7
Generator
List Comprehension
Matplotlib issue on OS X ("ImportError: cannot import name _thread")
Python
Macos
Python 2.7
Matplotlib
Python Dateutil
how to merge two data frames based on particular column in pandas python?
Python
Pandas
Python 2.7
Merge
Print Combining Strings and Numbers
Python
Python 2.7
How to completely traverse a complex dictionary of unknown depth?
Python
Json
Dictionary
Python 2.7
Convert timedelta64[ns] column to seconds in Python Pandas DataFrame
Python
Python 2.7
Numpy
Pandas
Make new column in Panda dataframe by adding values from other columns
Python
Python 2.7
Pandas
StringIO replacement that works with bytes instead of strings?
Python
Unicode
Python 2.7
Stringio
Parse a tuple from a string?
Python
Python 2.7
How do I make a fixed size formatted string in python?
Python
Python 2.7
Inherited class variable modification in Python
Python
Python 2.7
I want to multiply two columns in a pandas DataFrame and add the result into a new column
Python
Python 2.7
Pandas
How to install PIL with pip on Mac OS?
Python
Macos
Python 2.7
Installation
Python Imaging-Library
Can Python pickle lambda functions?
Python
Python 2.7
Lambda
Pickle
Find empty or NaN entry in Pandas Dataframe
List
Python 2.7
Pandas
Indexing
Dataframe
TypeError: super() takes at least 1 argument (0 given) error is specific to any python version?
Python
Python 2.7
Python 2.x
How to print to console in pytest?
Python
Unit Testing
Python 2.7
Pytest
How to list all fields of a class (and no methods)?
Python
Python 2.7
Introspection
Why is a list comprehension so much faster than appending to a list?
Python
List
Python 2.7
Python 3.x
List Comprehension
Symbol not found: __PyCodecInfo_GetIncrementalDecoder
Python
Python 2.7
Pycharm
Setuptools
Local variable referenced before assignment?
Python
Python 2.7
Python 3.x
Variable Assignment
Comparing two pandas dataframes for differences
Python
Python 2.7
Pandas
Homebrew brew doctor warning about /Library/Frameworks/Python.framework, even with brew's Python installed
Python
Macos
Python 2.7
Homebrew
Brew Doctor
Different object size of True and False in Python 3
Python
Python 3.x
Python 2.7
Cpython
Python Internals
Error: 'int' object is not subscriptable - Python
Python
Python 2.7
Type Conversion
Python decorator best practice, using a class vs a function
Python
Python 2.7
Decorator
Syntactic Sugar
I have 2 versions of python installed, but cmake is using older version. How do I force cmake to use the newer version?
Python
Python 2.7
Cmake
Read and Write CSV files including unicode with Python 2.7
Python
Csv
Python 2.7
Unicode
Export
Elegant way to perform tuple arithmetic
Python
Python 2.7
Numpy
Tuples
urllib and "SSL: CERTIFICATE_VERIFY_FAILED" Error
Python
Python 2.7
Ssl
Ssl Certificate
Urllib
Python 2.7 on Ubuntu
Python
Ubuntu
Python 2.7
Weak References in python
Python
Python 2.7
Cannot find module cv2 when using OpenCV
Python
Python 2.7
Opencv
Raspberry Pi
(13: Permission denied) while connecting to upstream:[nginx]
Django
Python 2.7
Nginx
Gunicorn
When and how to use Python's RLock
Python
Python 2.7
Locking
Move and replace if same file name already exists?
Python 2.7
Shutil
Disable iPython Notebook Autoscrolling
Python
Python 2.7
Ipython
Jupyter Notebook
ImportError: No module named google.protobuf
Python
Python 2.7
Protocol Buffers
How do I get a decimal value when using the division operator in Python?
Python
Python 2.7
Math
Syntax
Operators
how to get the last part of a string before a certain character?
Python
String
Python 2.7
Split
Slice
Python: count repeated elements in the list
Python
Python 2.7
How to extract text from an existing docx file using python-docx
Python
Python 2.7
Python 3.x
Python Docx
super() and @staticmethod interaction
Python
Python 2.7
Static Methods
Super
Python - cant find pip.ini or pip.conf in Windows
Windows
Python 2.7
Configuration
Pip
What is the meaning of "int(a[::-1])" in Python?
Python
Python 2.7
Python 3.x
How to calculate 1st and 3rd quartiles?
Python
Python 2.7
Pandas
Numpy
Remove text between () and []
Python
Python 2.7
How to pickle a namedtuple instance correctly
Python
Python 2.7
Pickle
Namedtuple
How to use 2to3 properly for python?
Python
Python 2.7
Python 3.3
Python 2to3
Delete a dictionary item if the key exists
Python
Python 2.7
Python's requests "Missing dependencies for SOCKS support" when using SOCKS5 from Terminal
Python
Python 2.7
Python Requests
Socks
Urllib3
Drop all data in a pandas dataframe
Python
Python 2.7
Pandas
Python: Assign Value if None Exists
Python
Python 2.7
Variable Assignment
Language Comparisons
memoization library for python 2.7
Python
Python 2.7
Memoization
BeautifulSoup getText from between <p>, not picking up subsequent paragraphs
Python
Python 2.7
Beautifulsoup
How to return HTTP 400 response in Django?
Django
Python 2.7
Module imports and __init__.py
Python
Python 2.7
Import
bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested: lxml. Do you need to install a parser library?
Python
Python 2.7
Beautifulsoup
Lxml
Understanding Pickling in Python
Python
Pickle
Python 2.7
Python, Deleting all files in a folder older than X days
Python
Python 2.7
How to specify where a Tkinter window opens?
Python
Python 2.7
Tkinter
How to use __setattr__ correctly, avoiding infinite recursion
Python
Python 2.7
Getattr
Setattr
Flask logging - Cannot get it to write to a file
Python
Logging
Python 2.7
Flask
Check if a string in a Pandas DataFrame column is in a list of strings
Python
Python 2.7
Pandas
Pymysql Insert Into not working
Python
Mysql
Eclipse
Python 2.7
Pymysql
How to remove any URL within a string in Python
Python
Regex
Url
Replace
Python 2.7
How to check deque length in Python
Python
Python 3.x
Python 2.7
Data Structures
Pass keyword arguments to target function in Python threading.Thread
Python
Multithreading
Python 2.7
Python Multithreading
Keyword Argument
'virtualenv' is not recognized as an internal or external command, operable program or batch file
Python
Python 2.7
Virtualenv
R and Python in one Jupyter notebook
Python
R
Python 2.7
Ipython
Jupyter Notebook
I'm trying to use python in powershell
Python
Powershell
Python 2.7
How to pass an operator to a python function?
Python
Function
Python 2.7
Where is the "from __future__ import braces" code?
Python
Python 2.7
Python Internals
Convert timedelta to floating-point
Python
Datetime
Python 2.7
Floating Point
Timedelta
Cmake is not able to find Python-libraries
Python
Python 2.7
Cmake
Python: Write unittest for console print
Python
Python 2.7
Unit Testing
Console
Python Unittest
Generate list of months between interval in python
Python
Python 2.7
Opencv - Grayscale mode Vs gray color conversion
Python
Python 2.7
Opencv
ImportError: No module named google.cloud
Python 2.7
Python Import
Google Speech-Api
Google Cloud-Speech
dump() missing 1 required positional argument: 'fp' in python json
Python
Json
Python 2.7
Python 3.x
python ignore certificate validation urllib2
Python
Python 2.7
Urllib2
Python Requests
Running conda with proxy
Python 2.7
Proxy
Anaconda
How to call super method from grandchild class?
Python
Python 2.7
Inheritance
Super
Grandchild
How do I install Keras and Theano in Anaconda Python on Windows?
Python 2.7
Python 3.x
Anaconda
Theano
Keras
Pandas DataFrame.to_csv raising IOError: No such file or directory
Python
Python 2.7
Pandas
How can I prevent a window from being resized with tkinter?
Python
Python 2.7
Tkinter
jinja2 - how to put a block in an if statement?
Python
Python 2.7
If Statement
Flask
Jinja2
Checking fuzzy/approximate substring existing in a longer string, in Python?
Python
Python 2.7
Fuzzy Search
Running an Excel macro via Python?
Python
Excel
Vba
Python 2.7
Why can a dictionary be unpacked as a tuple?
Python
Python 2.7
Dictionary
Iterable Unpacking
How can I make a for-loop pyramid more concise in Python?
Python
Performance
Python 2.7
Python 3.x
Why is the time complexity of python's list.append() method O(1)?
Python
Python 2.7
Time Complexity
Amortized Analysis
Python "pip install " is failing with AttributeError: 'module' object has no attribute 'SSL_ST_INIT'
Python
Python 2.7
Ubuntu
Pyopenssl
Add list to set?
Python
List
Python 2.7
Set
How to update the image of a Tkinter Label widget?
Python
Python 2.7
Tkinter
Python Imaging-Library
selecting attribute values from lxml
Python
Python 2.7
Attributes
Lxml
setup.py: renaming src package to project name
Python
Python 2.7
Distutils
cv2.imshow() function is opening a window that always says not responding - python opencv
Opencv
Python 2.7
Python glob but against a list of strings rather than the filesystem
Python
Regex
Python 2.7
Glob
Using Merge on a column and Index in Pandas
Python
Python 2.7
Pandas
Merge
How to completely uninstall python 2.7.13 on Ubuntu 16.04
Python
Python 2.7
Ubuntu
Ubuntu 16.04
How define constructor implementation for an Abstract Class in Python?
Python
Python 2.7
Oop
Abstract Class
Correct Type annotation for __init__
Python
Python 2.7
Typing
Check if a process is running or not on Windows?
Python
Windows
Python 2.7
Converting string to tuple without splitting characters
Python
List
Python 2.7
Python 3.x
Tuples
How to make SQLAlchemy in Tornado to be async?
Python
Python 2.7
Sqlalchemy
Tornado
How to pass dictionary as command line argument to Python script?
Python
Python 2.7
Command Line
How to set default text for a Tkinter Entry widget
Python
Python 3.x
Python 2.7
User Interface
Tkinter
Changing the referer URL in python requests
Python
Python 2.7
Python Requests
Referer
Getting rid of \n when using .readlines()
Python
Python 2.7
Readline
Import psycopg2 Library not loaded: libssl.1.0.0.dylib
Python
Database
Postgresql
Python 2.7
Postgresql 9.3
In Python how to obtain a partial view of a dict?
Python
Python 2.7
Dictionary
how to put an Item in aws DynamoDb using aws Lambda with python
Python
Python 2.7
Aws Lambda
Amazon Dynamodb
How can I use io.StringIO() with the csv module?
Python
Csv
Unicode
Python 2.7
Python dynamic function creation with custom names
Python
Python 2.7
Closures
Metaprogramming
Dynamic Function
Enforcing python version in setup.py
Python
Python 2.7
Setuptools
Why can a floating point dictionary key overwrite an integer key with the same value?
Python
Python 2.7
Dictionary
Floating Point
Int
OpenCV/Python: read specific frame using VideoCapture
Python
Python 2.7
Opencv
Using abc.ABCMeta in a way it is compatible both with Python 2.7 and Python 3.5
Python
Python 2.7
Metaclass
Python 3.5
Abc
Linux command-line call not returning what it should from os.system?
Python
Linux
Python 2.7
Command Line
os.system
ImportError: No module named _ssl
Python
Python 2.7
Permission problems when creating a dir with os.makedirs in Python
Python
Python 2.7
How to remove \xa0 from string in Python?
Python
Python 2.7
Unicode
Beautifulsoup
Utf 8
Pythonic way to iterate over a collections.Counter() instance in descending order?
Collections
Iteration
Python 2.7
Python
Use a loop to plot n charts Python
Python 2.7
Matplotlib
Pandas
How to convert a hex string to hex number
Python
String
Python 2.7
Hex
How can I pass arguments into redirect(url_for()) of Flask?
Python 2.7
Flask