Skip to main content

A creative package to move columns in Python dataframes.

Project description

MoveColumn

Downloads PyPI - Status GitHub issues GitHub stars GitHub license

About

A creative package to move columns in Python dataframes.

Requirements

movecolumn requires python 3.6 or greater.

Installation

Install with pip:

pip install movecolumn

If you are using the old version of movecolumn and want to update it:

pip install --upgrade movecolumn

Examples

import movecolumn as mc

# move column b of dataframe df to first position
df1 = mc.MoveTo1(df,'b')

# move column d to 2nd position
df2 = mc.MoveTo2(df,'d')

# move column d to 3rd position
df3 = mc.MoveTo3(df,'d')

# move column e to 4th position
df4 = mc.MoveTo4(df,'e')

# move column e to 5th position
df5 = mc.MoveTo5(df,'e')

# move column c to last position
df6 = mc.MoveToLast(df,'c')

# move column d to nth position, n = 1 for left most column, 2 for second column
df7 = mc.MoveToN(df,'f',3)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

movecolumn-0.0.7.tar.gz (6.4 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page