Top "Pandas" questions

Pandas is a Python library for data manipulation and analysis, e.g. dataframes, multidimensional time series and cross-sectional datasets commonly found in statistics, experimental science results, econometrics, or finance.

Replacing column values in a pandas DataFrame

I'm trying to replace the values in one column of a dataframe. The column ('female') only contains the values 'female' …

python pandas
Pandas DataFrame column to list

I am pulling a subset of data from a column based on conditions in another column being met. I can …

python pandas
Pandas DataFrame Groupby two columns and get counts

I have a pandas dataframe in the following format: df = pd.DataFrame([[1.1, 1.1, 1.1, 2.6, 2.5, 3.4,2.6,2.6,3.4,3.4,2.6,1.1,1.1,3.3], list('AAABBBBABCBDDD'), [1.1, 1.7, 2.5, 2.6, 3.3, 3.8,4.0,4.2,4.3,4.5,4.6,4.7,4.7,4.8], ['x/y/z','x/y','x/…

python pandas dataframe
UnicodeDecodeError when reading CSV file in Pandas with Python

I'm running a program which is processing 30,000 similar files. A random number of them are stopping and producing this error... …

python pandas csv dataframe unicode
How to add an empty column to a dataframe?

What's the easiest way to add an empty column to a pandas DataFrame object? The best I've stumbled upon is …

python pandas
Extracting specific selected columns to new DataFrame as a copy

I have a pandas DataFrame with 4 columns and I want to create a new DataFrame that only has three of …

python pandas chained-assignment
Pandas conditional creation of a series/dataframe column

I have a dataframe along the lines of the below: Type Set 1 A Z 2 B Z 3 B X 4 C Y …

python pandas numpy dataframe
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. …

python pandas csv dataframe concatenation
get list of pandas dataframe columns based on data type

If I have a dataframe with the following columns: 1. NAME object 2. On_Time object 3. On_Budget object 4. %actual_hr float64 5. …

python pandas