dataframe
- Ejemplos
Se trata de tres funciones que operan sobre un dataframe. | It consists of three functions that work with a dataframe. |
En el parámetro sdata pasaremos el dataframe con los datos. | In the sdata parameter you must pass in the dataframe with the data. |
Todos los ejemplos se deben realizar sobre un dataframe del que se hayan eliminado los valores faltantes. | All examples must be run with a dataframe in which you have been removed the missing values. |
El resultado de la función será un dataframe con las columnas seleccionadas y los pesos actualizados según el tamaño de la muestra. | The result returned by the function will be a dataframe with the selected columns and the weights updated according to the size of the sample. |
El parámetro sdata es para el dataframe con los datos, y cppc es un vector con los índices o nombres de las columnas con los factores. | The sdata parameter is for the dataframe with the data, and cppc is a vector with indexes or column names of the factors. |
Las muestras se realizan a partir de un dataframe que contiene el conjunto completo de datos, el cual se construye a partir de los datos extraídos por la aplicación WinPODUtil. | The samples are made from a dataframe containing the complete data set, which is constructed from the data extracted by the WinPODUtil application. |
En este segundo ejemplo volvemos a realizar un muestreo con corrección de pesos, pero esta vez utilizando una de las columnas del dataframe como índice para realizar un muestreo estratificado. | In this second example we make again a sampling with weights correction, but this time using a column of the dataframe as an index for a stratified sampling. |
El resultado será un dataframe con las columnas seleccionadas, más la columna de estratificación, con un número aproximadamente igual de registros para cada uno de los valores de dicha columna. | The result is a dataframe with the selected columns, plus the stratification column, with approximately equal numbers of records for each of the values in that column. |
En el dataframe que devuelve esta función, tenemos una primera columna con la serie original (ts), y una serie de columnas con valores de la serie desplazados un número determinado de términos (lags). | In the dataframe that returns this function, we have a first column with the original series (ts), and a series of columns with values of the series displaced a determined number of terms (lags). |
En el primer parámetro pasamos el dataframe con los datos, en el segundo los índices de las columnas con los valores plausibles, el tercero es para indicar la columna con el peso del alumno y el último para los índices de las columnas con los pesos replicados. | In the first parameter we pass the dataframe with the data, in the second the indices of the columns with the plausible values, the third is to indicate the column with the student weight and the last one for the indices of the columns with replicate weights. |
En el parámetro data le pasaremos el dataframe con el conjunto de datos completo. | The data parameter is for the dataframe with the entire dataset. |
Para terminar esta entrada, veremos una función que nos permite ver rápidamente las relaciones entre las variables de un DataFrame. | One last function that we may use often to quickly overview the properties of a DataFrame is PairGrid, that shows the relation among all pairs of variables. |
