Fix Python – Which is the preferred way to concatenate a string in Python?

Since Python’s string can’t be changed, I was wondering how to concatenate a string more efficiently?
I can write like it:
s += stringfromelsewhere

or like this:
s = []

s.append(somestring)

# later

s = ”.join(s)

While writing this question, I found a good article talking about the topic.
http://www.skymind.com/~ocrow/python_string/
B….

Fix Python – Import multiple csv files into pandas and concatenate into one DataFrame

I would like to read several csv files from a directory into pandas and concatenate them into one big DataFrame. I have not been able to figure it out though. Here is what I have so far:
import glob
import pandas as pd

# get data file names
path =r’C:\DRO\DCL_rawdata_files’
filenames = glob.glob(path + “/*.csv”)

dfs = []
for filename in filename….

Fix Python – Pandas Merging 101

How can I perform a (INNER| (LEFT|RIGHT|FULL) OUTER) JOIN with pandas?
How do I add NaNs for missing rows after a merge?
How do I get rid of NaNs after merging?
Can I merge on the index?
How do I merge multiple DataFrames?
Cross join with pandas
merge? join? concat? update? Who? What? Why?!

… and more. I’ve seen these recurring questions askin….