[Tutor] check if two differently shaped dataframes are contained one another

dn PythonList at DancesWithMice.info
Mon Apr 3 19:02:29 EDT 2023


On 04/04/2023 06.17, marc nicole wrote:
> Hello,
> 
> I have this first dataframe
> 
> 1  2
> 3  4
> 
> and this second dataframe
> 
> 5 9 3 8
> 7 1 2 0
> 6 3 4 10
> 
> and i want to check whether the first dataframe is contained in the second
> (which is the case here)
> 
> I know that .isin() and .compare() both require that the dataframes are
> shaped the same.
> Note: I am looking for a "pandas" oriented solution

This looks like fun...

What is the use-case, the reason for searching for such sub-set data-frames?

What have you tried thus-far?

Why does it have to be a pandas-implementation?

-- 
Regards,
=dn


More information about the Tutor mailing list