MCPcopy Create free account
hub / github.com/dask/dask / merge

Method merge

dask/dataframe/dask_expr/_collection.py:2853–2974  ·  view source on GitHub ↗

Merge the DataFrame with another DataFrame This will merge the two datasets, either on the indices, a certain column in each dataset or the index in one dataset and the column in another. Parameters ---------- right: dask.dataframe.DataFrame how : {'

(
        self,
        right,
        how="inner",
        on=None,
        left_on=None,
        right_on=None,
        left_index=False,
        right_index=False,
        suffixes=("_x", "_y"),
        indicator=False,
        shuffle_method=None,
        npartitions=None,
        broadcast=None,
    )

Source from the content-addressed store, hash-verified

2851 return new_collection(self.expr.clip(lower, upper, axis))
2852
2853 def merge(
2854 self,
2855 right,
2856 how="inner",
2857 on=None,
2858 left_on=None,
2859 right_on=None,
2860 left_index=False,
2861 right_index=False,
2862 suffixes=("_x", "_y"),
2863 indicator=False,
2864 shuffle_method=None,
2865 npartitions=None,
2866 broadcast=None,
2867 ):
2868 """Merge the DataFrame with another DataFrame
2869
2870 This will merge the two datasets, either on the indices, a certain column
2871 in each dataset or the index in one dataset and the column in another.
2872
2873 Parameters
2874 ----------
2875 right: dask.dataframe.DataFrame
2876 how : {'left', 'right', 'outer', 'inner', 'leftsemi'}, default: 'inner'
2877 How to handle the operation of the two objects:
2878
2879 - left: use calling frame's index (or column if on is specified)
2880 - right: use other frame's index
2881 - outer: form union of calling frame's index (or column if on is
2882 specified) with other frame's index, and sort it
2883 lexicographically
2884 - inner: form intersection of calling frame's index (or column if
2885 on is specified) with other frame's index, preserving the order
2886 of the calling's one
2887 - leftsemi: Choose all rows in left where the join keys can be found
2888 in right. Won't duplicate rows if the keys are duplicated in right.
2889 Drops all columns from right.
2890
2891 on : label or list
2892 Column or index level names to join on. These must be found in both
2893 DataFrames. If on is None and not merging on indexes then this
2894 defaults to the intersection of the columns in both DataFrames.
2895 left_on : label or list, or array-like
2896 Column to join on in the left DataFrame. Other than in pandas
2897 arrays and lists are only support if their length is 1.
2898 right_on : label or list, or array-like
2899 Column to join on in the right DataFrame. Other than in pandas
2900 arrays and lists are only support if their length is 1.
2901 left_index : boolean, default False
2902 Use the index from the left DataFrame as the join key.
2903 right_index : boolean, default False
2904 Use the index from the right DataFrame as the join key.
2905 suffixes : 2-length sequence (tuple, list, ...)
2906 Suffix to apply to overlapping column names in the left and
2907 right side, respectively
2908 indicator : boolean or string, default False
2909 If True, adds a column to output DataFrame called "_merge" with
2910 information on the source of each row. If string, column with

Callers 15

joinMethod · 0.95
test_io_fusion_mergeFunction · 0.95
test_io_fusion_mergeFunction · 0.95
test_fuse_broadcast_depsFunction · 0.95
test_mergeFunction · 0.95
test_broadcast_mergeFunction · 0.95
test_merge_lenFunction · 0.95
test_merge_empty_left_dfFunction · 0.95
test_merge_pandas_objectFunction · 0.95

Calls 1

mergeFunction · 0.70

Tested by 15

test_io_fusion_mergeFunction · 0.76
test_io_fusion_mergeFunction · 0.76
test_fuse_broadcast_depsFunction · 0.76
test_mergeFunction · 0.76
test_broadcast_mergeFunction · 0.76
test_merge_lenFunction · 0.76
test_merge_empty_left_dfFunction · 0.76
test_merge_pandas_objectFunction · 0.76