Top "Dataframe" questions

A data frame is a 2D tabular data structure.

How do I combine two data-frames based on two columns?

I know I can use the plyr and its friends to combine dataframes, and merge as well, but so far …

r merge dataframe
Subset of rows containing NA (missing) values in a chosen column of a data frame

We have a data frame from a CSV file. The data frame DF has columns that contain observed values and …

r csv dataframe subset na
Transpose a data frame

I need to transpose a large data frame and so I used: df.aree <- t(df.aree) df.…

r dataframe
Pandas DataFrame: replace all values in a column, based on condition

I have a simple DataFrame like the following: I want to select all values from the 'First Season' column and …

python pandas dataframe
Convert a Pandas DataFrame to a dictionary

I have a DataFrame with four columns. I want to convert this DataFrame to a python dictionary. I want the …

python pandas dictionary dataframe
Replacing few values in a pandas dataframe column with another value

I have a pandas dataframe df as illustrated below: BrandName Specialty A H B I ABC J D K AB …

python replace pandas dataframe
How to check if a column exists in Pandas

Is there a way to check if a column exists in a Pandas DataFrame? Suppose that I have the following …

python pandas dataframe
Filter Pyspark dataframe column with None value

I'm trying to filter a PySpark dataframe that has None as a row value: df.select('dt_mvmt').distinct().collect() […

python apache-spark dataframe pyspark apache-spark-sql
Convert pandas data frame to series

I'm somewhat new to pandas. I have a pandas data frame that is 1 row by 23 columns. I want to convert …

python pandas dataframe series
Detect and exclude outliers in Pandas data frame

I have a pandas data frame with few columns. Now I know that certain rows are outliers based on a …

python pandas filtering dataframe outliers