Repository: databricks/koalas

Issue:
TypeError: copy() got an unexpected keyword argument 'deep'
Hi,
In koalas I understand .copy() is implemented not like pandas, but I get error from the outside package scorecardpy
```
/databricks/python/lib/python3.7/site-packages/scorecardpy/woebin.py in woebin(dt, y, x, var_skip, breaks_list, special_values, stop_limit, count_distr_limit, bin_num_limit, positive, no_cores, print_step, method, ignore_const_cols, ignore_datetime_cols, check_cate_num, replace_blank, save_breaks_list, **kwargs)
    886     if print_info: print('[INFO] creating woe binning ...')
    887 
--> 888     dt = dt.copy(deep=True)
    889     if isinstance(y, str):
    890         y = [y]

/databricks/python/lib/python3.7/site-packages/databricks/koalas/usage_logging/__init__.py in wrapper(*args, **kwargs)
    168             start = time.perf_counter()
    169             try:
--> 170                 res = func(*args, **kwargs)
    171                 logger.log_success(
    172                     class_name, function_name, time.perf_counter() - start, signature

TypeError: copy() got an unexpected keyword argument 'deep'
```
Is there any fix for it?


Discussion:
@HyukjinKwon @ueshin 

How about we add dummy keyword `deep` argument for hot-fixing this for now?

Resolving patch:
diff --git a/databricks/koalas/frame.py b/databricks/koalas/frame.py
--- a/databricks/koalas/frame.py
+++ b/databricks/koalas/frame.py
@@ -4702,10 +4702,15 @@ def to_records(self, index=True, column_dtypes=None, index_dtypes=None):
             kdf._to_internal_pandas(), self.to_records, pd.DataFrame.to_records, args
         )
 
-    def copy(self) -> "DataFrame":
+    def copy(self, deep=None) -> "DataFrame":
         """
         Make a copy of this object's indices and data.
 
+        Parameters
+        ----------
+        deep : None
+            this parameter is not supported but just dummy parameter to match pandas.
+
         Returns
         -------
         copy : DataFrame
diff --git a/databricks/koalas/indexes.py b/databricks/koalas/indexes.py
--- a/databricks/koalas/indexes.py
+++ b/databricks/koalas/indexes.py
@@ -961,7 +961,7 @@ def _validate_index_level(self, level):
                 "Requested level ({}) does not match index name ({})".format(level, self.name)
             )
 
-    def copy(self, name=None):
+    def copy(self, name=None, deep=None):
         """
         Make a copy of this object. name sets those attributes on the new object.
 
@@ -969,6 +969,8 @@ def copy(self, name=None):
         ----------
         name : string, optional
             to set name of index
+        deep : None
+            this parameter is not supported but just dummy parameter to match pandas.
 
         Examples
         --------
@@ -2243,9 +2245,35 @@ def nunique(self, dropna=True):
         raise NotImplementedError("isna is not defined for MultiIndex")
 
     # TODO: add 'name' parameter after pd.MultiIndex.name is implemented
-    def copy(self):
+    def copy(self, deep=None):
         """
         Make a copy of this object.
+
+        Parameters
+        ----------
+        deep : None
+            this parameter is not supported but just dummy parameter to match pandas.
+
+        Examples
+        --------
+        >>> df = ks.DataFrame([(.2, .3), (.0, .6), (.6, .0), (.2, .1)],
+        ...                   columns=['dogs', 'cats'],
+        ...                   index=[list('abcd'), list('efgh')])
+        >>> df['dogs'].index  # doctest: +SKIP
+        MultiIndex([('a', 'e'),
+                    ('b', 'f'),
+                    ('c', 'g'),
+                    ('d', 'h')],
+                   )
+
+        Copy index
+
+        >>> df.index.copy()  # doctest: +SKIP
+        MultiIndex([('a', 'e'),
+                    ('b', 'f'),
+                    ('c', 'g'),
+                    ('d', 'h')],
+                   )
         """
         return MultiIndex(self._kdf.copy())
 
diff --git a/databricks/koalas/series.py b/databricks/koalas/series.py
--- a/databricks/koalas/series.py
+++ b/databricks/koalas/series.py
@@ -3525,10 +3525,15 @@ def pop(self, item):
 
         return _col(DataFrame(internal))
 
-    def copy(self) -> "Series":
+    def copy(self, deep=None) -> "Series":
         """
         Make a copy of this object's indices and data.
 
+        Parameters
+        ----------
+        deep : None
+            this parameter is not supported but just dummy parameter to match pandas.
+
         Returns
         -------
         copy : Series


Test patch: