Try this
new_df = pd.merge(A_df, B_df, how='left', left_on=['A_c1','c2'], right_on = ['B_c1','c2'])
left_on : label or list, or array-like Field names to join on in left DataFrame. Can be a vector or list of vectors of the length of the DataFrame to use a particular vector as the join key instead of columns
right_on : label or list, or array-like Field names to join on in right DataFrame or vector/list of vectors per left_on docs
Related Posts:
- How to Read .txt in Pandas
- Type error: cannot convert the series to
- Pandas join issue: columns overlap but no suffix specified
- AttributeError: ‘Series’ object has no attribute ‘reshape’
- ImportError: No module named ‘xlrd’
- Moving Average Pandas
- matplotlib: plot multiple columns of pandas data frame on the bar chart
- How to print a specific row of a pandas DataFrame?
- SyntaxError: unexpected EOF while parsing
- TypeError: only integer scalar arrays can be converted to a scalar index with 1D numpy indices array
- Microsoft Visual C++ 14.0 is required (Unable to find vcvarsall.bat)
- How to install pip with Python 3?
- Import Error: No module named numpy
- How to deal with SettingWithCopyWarning in Pandas
- How to deal with SettingWithCopyWarning in Pandas
- How to iterate over rows in a DataFrame in Pandas
- TypeError: a bytes-like object is required, not ‘str’ when writing to a file in Python3
- Writing a pandas DataFrame to CSV file
- Relative imports in Python 3
- Best way to convert string to bytes in Python 3?
- ImportError: No module named pandas. Pandas installed pip
- Using Python 3 in virtualenv
- “Series objects are mutable and cannot be hashed” error
- hashlib.md5() TypeError: Unicode-objects must be encoded before hashing
- Could not find a version that satisfies the requirement tensorflow
- Convert Python dict into a dataframe
- Local variable referenced before assignment?
- re.sub erroring with “Expected string or bytes-like object”
- How do I select rows from a DataFrame based on column values?
- DataFrame constructor not properly called! error
- AttributeError: ‘module’ object has no attribute ‘urlopen’
- Pandas group-by and sum
- Python pandas groupby aggregate on multiple columns, then pivot
- Can’t fix “zipimport.ZipImportError: can’t decompress data; zlib not available” when I type in “python3.6 get-pip.py”
- ‘method’ object is not subscriptable. Don’t know what’s wrong
- TypeError: Missing 1 required positional argument: ‘self’
- SystemError: Parent module ” not loaded, cannot perform relative import
- TypeError: ‘<=' not supported between instances of 'str' and 'int' [duplicate]
- TypeError: unsupported operand type(s) for -: ‘str’ and ‘int’
- pandas: filter rows of DataFrame with operator chaining
- Convert DataFrame column type from string to datetime, dd/mm/yyyy format
- Pandas how to use pd.cut()
- TypeError: cannot convert the series to
- Pinging servers in Python
- Get a list from Pandas DataFrame column headers
- Add Legend to Seaborn point plot
- ‘End of statement expected’ in pycharm
- How to pass arguments to a Button command in Tkinter?
- How to remove specific substrings from a set of strings in Python?
- Change figure size and figure format in matplotlib
- How can I concatenate str and int objects?
- error: Failed to load the native TensorFlow runtime
- ImportError: No module named ‘encodings’
- How to check whether a pandas DataFrame is empty?
- Convert columns to string in Pandas
- enumerate() for dictionary in python
- How to load a tsv file into a Pandas DataFrame?
- PermissionError: [WinError 5] Access is denied
- How to iterate over columns of pandas dataframe to run regression
- JSON to pandas DataFrame
- Converting between datetime and Pandas Timestamp objects
- Creating a Pandas DataFrame from a Numpy array: How do I specify the index column and column headers?
- Convert pandas data frame to series
- How can I install Python’s pip3 on my Mac?
- Get first row value of a given column
- How to filter Pandas dataframe using ‘in’ and ‘not in’ like in SQL
- Deleting DataFrame row in Pandas based on column value
- Pandas long to wide reshape, by two variables
- What is the meaning of ‘for _ in range()
- SettingWithCopyWarning even when using .loc[row_indexer,col_indexer] = value
- Python sockets error TypeError: a bytes-like object is required, not ‘str’ with send function
- Python: AttributeError: ‘_io.TextIOWrapper’ object has no attribute ‘split’
- OSError: Initializing from file failed on csv in Pandas
- AttributeError: Can only use .str accessor with string values, which use np.object_ dtype in pandas
- Python Pandas ValueError Arrays Must be All Same Length
- ImportError: No module named ‘yaml’
- TypeError: ‘_io.TextIOWrapper’ object is not subscriptable
- Properly formatted multiplication table
- Plot correlation matrix using pandas
- How to print multiple lines of text with Python
- How do I run pip on python for windows?
- Rename specific column(s) in pandas
- What does {0} mean in this Python string?
- Tab Error in Python
- Python 3.5.1 urllib has no attribute request
- python pandas remove duplicate columns
- Why do I get this error “TypeError: ‘method’ object is not iterable”?
- What is the meaning of “int(a[::-1])” in Python?
- Pandas unstack problems: ValueError: Index contains duplicate entries, cannot reshape
- Python: Convert timedelta to int in a dataframe
- Calculate weighted average using a pandas/dataframe
- Got continuous is not supported error in RandomForestRegressor
- Getting a name error when trying to input a string [duplicate]
- ValueError: multiclass format is not supported
- Error loading MySQLdb module: No module named ‘MySQLdb’
- Iterating over dictionary items(), values(), keys() in Python 3
- ValueError: Must pass DataFrame with boolean values only
- Undefined variable error in function
- Python 3 integer division [duplicate]
- Python – difference between two strings