Skip to main content

Returns folder and sub folders from the data table in csv. Basically a decision tree with folders.

Project description

Data_FolderSplit

_____________________________________________

Segregate the data table in a csv file into folders containing sub folders of sliced/ segmented data for a physical representation of a decision tree.

The package includes 2 methods to achieve this.

  1. Using maximum uniques -> By limiting the system only use columns under a maximum number of uniques, there is lesser control (which could be better in certain instances.)

  2. Using Split by columns -> The user can input the columns or Folder structure order which can create a customized folder structure.


Instructions.

To install the package, perform:

pip install Data_FolderSplit

How to use the methods:

1. To create the folder structure using 'max_uniques':

#Importing Library.
import Data_FolderSplit as DFS

# filepath -> File path for the csv.
# max_uniques -> Max uniques allowed.
# output_folderpath -> Folder within which sub folders will be formed.

#For example:
filepath = r'D:\LinkinPark\Forever\Datasheet1.csv'
max_uniques = 4
output_folderpath = r'D:\ChesterBennington\is\a\Legend'


#To create the folders with sub folders.
DFS.using_maxUniques(filepath, max_uniques, output_folderpath)

2. To create the folder structure using 'Split_with_columnNames':

#Importing Library.
import Data_FolderSplit as DFS

# filepath -> File path for the csv.
# output_folderpath -> Folder within which sub folders will be formed.

#For example:
filepath = r'D:\LinkinPark\Forever\Datasheet1.csv'
output_folderpath = r'D:\ChesterBennington\is\a\Legend'


#To create the folders with sub folders.
DFS.Split_with_columnNames(filepath, output_folderpath)

Have fun. :-)

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

Data_FolderSplit-1.3.tar.gz (17.7 kB view hashes)

Uploaded Source

Built Distribution

Data_FolderSplit-1.3-py3-none-any.whl (17.4 kB view hashes)

Uploaded Python 3

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