diff options
author | Christian Cleberg <hello@cleberg.net> | 2024-10-19 11:46:55 -0500 |
---|---|---|
committer | Christian Cleberg <hello@cleberg.net> | 2024-10-19 11:46:55 -0500 |
commit | d6b72187ad3ad53d1b77e7e13a4659b6311de0e4 (patch) | |
tree | 3aba0d2f6a28e9e10a2d9f74ec92726842b0f7dc | |
parent | 3b03f7450c1a441cbccab1dceedc8aec250daf9c (diff) | |
download | audit-tools-d6b72187ad3ad53d1b77e7e13a4659b6311de0e4.tar.gz audit-tools-d6b72187ad3ad53d1b77e7e13a4659b6311de0e4.tar.bz2 audit-tools-d6b72187ad3ad53d1b77e7e13a4659b6311de0e4.zip |
fix pylint issues
-rw-r--r-- | sampling/sample.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sampling/sample.py b/sampling/sample.py index a2435d8..f8ea211 100644 --- a/sampling/sample.py +++ b/sampling/sample.py @@ -1,8 +1,12 @@ +""" +Creates a sample from a CSV or Excel file based on user-defined SAMPLE_SIZE. +""" + # Import packages import pandas as pd # Define the sample size -sample_size = 25 +SAMPLE_SIZE = 25 # Import the data to a pandas DataFrame df = pd.read_csv("FILENAME_GOES_HERE.csv") @@ -15,8 +19,8 @@ df = pd.read_csv("FILENAME_GOES_HERE.csv") print("Dataframe size (rows, columns): ", df.shape) # Sample -sample = df.sample(sample_size) -print("Sample size: ", sample_size) +sample = df.sample(SAMPLE_SIZE) +print("Sample size: ", SAMPLE_SIZE) print("Sample:\n", sample) # ALTERNATIVE: Replacement Samples |