Skip to content

Tag: dataframe

Pandas datetime filter

I want to get subset of my dataframe if date is before 2022-04-22. The original df is like below df: I checked data type by df.dtypes and it told me ‘date’ column is ‘object’. So I checked individual cell using df[‘date’][0] and it is datetime.date(2022, 4, 21). Also, df[&#…

Combine multiple dataframes wit pandas

I use the following script to measure the average RGB color of the picture in a selected path. I tried to make 1 dataframe with pd.concat but it doesn’t work out. This is the result that I get: But I want just 1 dataframe with one average like this: Answer Use: