Creates a shallow copy of the DataFrame.

        Returns:
            A new DataFrame pointing to the same partitions as this one.
482813
def copy(self, deep=True):
        
        return self.__constructor__(query_compiler=self._query_compiler.copy())
414294
def copy(self):
        
        other = ProtoFeed()
        for key in cs.PROTOFEED_ATTRS:
            value = getattr(self, key)
            if isinstance(value, pd.DataFrame):
                # Pandas copy DataFrame
                value = value.copy()
            setattr(other, key, value)

        return other
305132
def copy(self):
        
        return GrainBoundary(self.lattice, self.species_and_occu, self.frac_coords,
                             self.rotation_axis, self.rotation_angle, self.gb_plane,
                             self.join_plane, self.init_cell, self.vacuum_thickness,
                             self.ab_shift, self.site_properties, self.oriented_unit_cell)
366190
def new_db_from_pandas(self, frame, table=None, data=None, load=True, **kwargs):
        

        from ..orm import Column
        # from dbexceptions import ConfigurationError

        # Create the table from the information in the data frame.
        with self.bundle.session:
            sch = self.bundle.schema
            t = sch.new_table(table)

            if frame.index.name:
                id_name = frame.index.name
            else:
                id_name = 'id'

            sch.add_column(t, id_name,
                           datatype=Column.convert_numpy_type(frame.index.dtype),
                           is_primary_key=True)

            for name, type_ in zip([row for row in frame.columns],
                                   [row for row in frame.convert_objects(convert_numeric=True,
                                                                         convert_dates=True).dtypes]):
                sch.add_column(t, name, datatype=Column.convert_numpy_type(type_))
                sch.write_schema()

        p = self.new_partition(table=table, data=data, **kwargs)

        if load:
            pk_name = frame.index.name
            with p.inserter(table) as ins:
                for i, row in frame.iterrows():
                    d = dict(row)
                    d[pk_name] = i

                    ins.insert(d)
        return p
775396
def new(self, data=None, dtype=None, if_fq=None):
        
        data = self.data if data is None else data

        dtype = self.type if dtype is None else dtype
        if_fq = self.if_fq if if_fq is None else if_fq

        temp = copy(self)
        temp.__init__(data, dtype, if_fq)
        return temp
467694
def from_rdd_of_dataframes(self, rdd, column_idxs=None):
        """"""
        def frame_to_spark_sql(frame):
            """Convert a Panda's DataFrame into Spark SQL Rows"""
            return [r.tolist() for r in frame.to_records()]

        def frame_to_schema_and_idx_names(frames):
            """Returns the schema and index names of the frames. Useful
            if the frame is large and we wish to avoid transfering
            the entire frame. Only bothers to apply once per partiton"""
            try:
                frame = frames.next()
                return [(list(frame.columns), list(frame.index.names))]
            except StopIteration:
                return []

        # Store if the RDD was persisted so we don't uncache an
        # explicitly cached input.
        was_persisted = rdd.is_cached
        # If we haven't been supplied with the schema info cache the RDD
        # since we are going to eveluate the first partition and then eveluate
        # the entire RDD as part of creating a Spark DataFrame.
        (schema, index_names) = ([], [])
        if not column_idxs:
            rdd.cache()
            (schema, index_names) = rdd.mapPartitions(
                frame_to_schema_and_idx_names).first()
        else:
            (schema, index_names) = column_idxs
        # Add the index_names to the schema.
        index_names = _normalize_index_names(index_names)
        schema = index_names + schema
        ddf = DataFrame.from_schema_rdd(
            self.sql_ctx.createDataFrame(rdd.flatMap(frame_to_spark_sql),
                                         schema=schema))
        ddf._index_names = index_names
        if not was_persisted:
            rdd.unpersist()
        return ddf
612856
def copy(self,deep=yes):
        
        if deep:
            return copy.deepcopy(self)
        else:
            return copy.copy(self)
1371436
def dataframe(self):
        
        temp_index = self._index
        rows = []
        indices = []
        if not self._season:
            return None
        for season in self._season:
            self._index = self._season.index(season)
            rows.append(self._dataframe_fields())
            indices.append(season)
        self._index = temp_index
        return pd.DataFrame(rows, index=[indices])
595299
def copy(self):
        
        c = copy.deepcopy(self)
        for key in c.conns:
            c.conns[key] = self.conns[key].copy()
        return c
1224888
def copy(self):
        
        out = type(self)()
        for series in self:
            out.append(series.copy())
        return out
588569
def new(self):
        # type: () -> None
        '''
        
        '''
        if self._initialized:
            raise pycdlibexception.PyCdlibInternalError('UDF Partition Map already initialized')

        self.part_num = 0  # FIXME: we should let the user set this

        self._initialized = True
750395
def copy(self):
        '''
            
        '''
        ret = QueryBuilder()
        ret.filters = copy.copy(self.filters)
        return ret
44543
def copy(self):
        """"""
        health = self.health, self.health_max
        r = self.r, self.r_max
        g = self.g, self.g_max
        b = self.b, self.b_max
        y = self.y, self.y_max
        x = self.x, self.x_max
        m = self.m, self.m_max
        h = self.h, self.h_max
        c = self.c, self.c_max
        return self.__class__(self.name, health, r, g, b, y, x, m, h, c)
1230378
def df=(new_dataframe)
      dsl_eval
      if new_dataframe.respond_to? :df_type
        @dataframe = new_dataframe
      else
        @dataframe = Remi::DataFrame.create(df_type, new_dataframe)
      end
    end
114848
def copy(self):
    
    return type(self)(self.chr,
                      self.start+self._start_offset,
                      self.end,
                      self.payload,
                      self.dir)
771557
def copy(self):
        
        result = copy.deepcopy(self)
        result._cache.clear()
        return result
817776
def copy(self):
        
        return self.__class__(self.x, self.y, *self._args, **self._kwargs)