tally.DataSet
tally.DataSet#
- class tally.DataSet(api_key=None, host='tally.datasmoothie.com', ssl=True, use_futures=False)#
A class that wraps a dataset and has all the information needed to send to the API in order to perform the various tasks.
- Parameters
name (string) – Name for the dataset
- __init__(api_key=None, host='tally.datasmoothie.com', ssl=True, use_futures=False)#
Methods
__init__
([api_key, host, ssl, use_futures])add_column_to_data
(name, data, new_meta)add_credentials
([api_key, host, ssl])Add your API key and what server it is authorized to connect to.
band
(**kwargs)Group numeric data with band definitions treated as group text labels.
build_excel
([data_params, filename])build_excel_from_dataframes
([data_params, ...])build_powerpoint
([data_params, filename, ...])compare
(**kwargs)Compares types, codes, values, question labels of two datasets.
convert_data_to_csv_json
(**kwargs)Converts data, either sent or from an external source to Quantipy CSV and JSON.
convert_data_to_sav
(**kwargs)Converts data, either sent or from an external source to an SPSS sav file.
convert_spss_to_csv_json
([data_params])copy
(**kwargs)Copy meta and case data of the variable defintion given per name.
crosstab
([data_params])derive
(**kwargs)Create meta and recode case data by specifying derived category logics.
extend_values
(**kwargs)Add an answer/value and code to the list of answer/values/codes already in the meta data for the variable.
feature_select
(**kwargs)Shows the variables that score the highest with a given ML features select algorithm
filter
(**kwargs)Filter the DataSet using a logical expression.
find
(**kwargs)Find variables by searching their names for substrings.
get_dataframe
()get_variable_text
(**kwargs)Return the variables text label information.
hmerge
(**kwargs)Merge Quantipy datasets together by appending rows.
joined_crosstab
(**kwargs)Does crosstab tabulation using the provided parameters, allowing for multiple datasources to be sent along with the request to run multiple crosstabs in one result.
merge_column_to_data
(name, data, new_meta, ...)meta
(**kwargs)Shows the meta-data for a variable
prepare_post_params
(data_params[, params])recode
(**kwargs)Create a new or copied series from data, recoded using a mapper.
remove_values
(**kwargs)Erase value codes safely from both meta and case data components.
set_value_texts
(**kwargs)Rename or add value texts in the ‘values’ object.
set_variable_text
(**kwargs)Change the variable text for a named variable.
sum
(**kwargs)Adds all values in each column and returns the sum for each column.
to_array
(**kwargs)Create a new variable grid (array) variable from two or more single variables with the same labels.
to_delimited_set
(**kwargs)Create a new variable delimited set (multi choice) variable from two or more single variables.
use_confirmit
(source_projectid, ...)Load remote Forsta/Confirmit data into the dataset as the data to send with all requests.
use_csv
(csv_file)Load CSV file into the dataset as the file to send with all requests.
use_nebu
(nebu_url)Load remote Nebu/Enghouse file into the dataset as the file to send with all requests.
use_parquet
(pq_data_filename[, pq_meta_filename])Load parquet file into memory as the file to send with all requests.
use_quantipy
(meta_json, data_csv)Load Quantipy meta and data files to this dataset.
use_spss
(file_path)Load SPSS file into memory as the file to send with all requests.
use_unicom
(mdd_filename, ddf_filename)Load parquet file into memory as the file to send with all requests.
values
(**kwargs)Get a list of value texts and codes for a categorical variable, as a dictionary.
variables
(**kwargs)Shows list of variables.
vmerge
(**kwargs)Merge Quantipy datasets together by appending rows.
weight
([data_params])write_quantipy
(file_path_json, file_path_csv)Write the case and meta data as Quantipy compatible json and csv files.
write_spss
(file_path, data_params, **kwargs)Writes the dataset to an SPSS (sav) file.
Attributes
dataset_type
qp_data
qp_meta
sav_data
tally