pandas.DataFrame.join Query
Jump to navigation
Jump to search
A pandas.DataFrame.join Query is a pandas.DataFrame query (for a pandas.DataFrame structure) that is a join query.
- Context:
- …
- Example(s)
result_df = pd.merge(left, right, on=['key1', 'key2'])
# with two shared columnsresult_df = pd.merge(left, right, left_on='key1', right_on='key2')
# on one differently named column- …
- Counter-Example(s)
- a pandas.Series Query, on a pandas.Series.
- a numpy.ndarray Query, on a numpy.ndarray.
- a SciPy Sparse Array Query.
- a Python Array Query.
- a Python List Query.
- a Perl Associative Array Query.
- a Perl Array Query.
- a SQL Table Query.
- an R DataFrame Query.
- See: pandas.DataFrame Attribute, Pandas DataFrame Operation.
References
2016
- http://pandas.pydata.org/pandas-docs/stable/merging.html#database-style-dataframe-joining-merging
result = pd.merge(left, right, on=['key1', 'key2'])