'Return a replica of the frame, optionally with new frame attributes.
The replica is a new frame object that has the same data as this frame
object and with frame attributes overriden if they are provided as extra
keyword arguments to this method. If ``copy`` is set to `True` then a
copy of the internal arrays will be made.  Otherwise the replica will
use a reference to the original arrays when possible to save memory. The
internal arrays are normally not changeable by the user so in most cases
it should not be necessary to set ``copy`` to `True`.
Parameters
copy : bool, optional
If True, the resulting object is a copy of the data.  When False,
references are used where  possible. This rule also applies to the
frame attributes.
Any additional keywords are treated as frame attributes to be set on the
new frame object.
Returns
frameobj : same as this frame
Replica of this object, but possibly with new frame attributes.'

def replicate(self, copy=False, **kwargs):

    return self._apply((u'copy' if copy else u'replicate'), **kwargs)
