You can merge them so:
s1 = pd.merge(dfA, dfB, how='inner', on=['S', 'T'])
To drop NA rows:
s1.dropna(inplace=True)
More Related Contents:
- How do I select rows from a DataFrame based on column values?
- Aggregation in Pandas
- Convert DataFrame column type from string to datetime
- How to convert an XML file to nice pandas dataframe?
- Constructing pandas DataFrame from values in variables gives “ValueError: If using all scalar values, you must pass an index”
- Can pandas automatically read dates from a CSV file?
- Selecting a row of pandas series/dataframe by integer index
- df.append() is not appending to the DataFrame
- pandas dataframe str.contains() AND operation
- Pandas groupby mean – into a dataframe?
- How do I find the closest values in a Pandas series to an input number?
- pandas groupby without turning grouped by column into index
- How do I count the NaN values in a column in pandas DataFrame?
- getting the index of a row in a pandas apply function
- Tilde sign in pandas DataFrame
- Drop columns whose name contains a specific string from pandas DataFrame
- Find the unique values in a column and then sort them
- how do I calculate a rolling idxmax
- Python Pandas How to assign groupby operation results back to columns in parent dataframe?
- python Pandas DataFrame copy(deep=False) vs copy(deep=True) vs ‘=’
- From password-protected Excel file to pandas DataFrame
- How to filter a pandas dataframe based on the length of a entry
- How can repetitive rows of data be collected in a single row in pandas?
- How is pandas groupby method actually working?
- Replace value for a selected cell in pandas DataFrame without using index
- Python pandas: how to remove nan and -inf values
- How to summarize on different groupby combinations?
- How to upload a CSV file in FastAPI and convert it into a Pandas Dataframe?
- DataFrame object has no attribute append
- Python Pandas : pandas.to_datetime() is switching day & month when day is less than 13