Posts by sagacello • 11 points
4 posts
-
0
votes1
answer25
viewsQ: Trying to lambda the dataset?
I’m trying to apply this function to the dataset: number_outliers = (df2 < (Q1 - 1.5 * IQR)) | (df2 > (Q3 + 1.5 * IQR)) df2.apply(((lambda x:df2[~((df2 < (Q1 - 1.5 * IQR)) | (df2 > (Q3 +…
-
-1
votes1
answer253
viewsQ: How to order a dataset
I’m trying to sort the numerical values of a dataset in ascending order using : df.sort_values(by=['radius_mean'], axis=0) But I would like to sort all the columns in ascending order and not sort…
-
-2
votes1
answer76
viewsQ: Separate columns from a dataset
I need to separate in a list the column types of a dataset in numerical and non-numerical. For example: def identifica_tipos(df): col_numerica = [] for col in df.columns: if col.isnumeric:…
-
0
votes1
answer335
viewsQ: String handling with python and pandas
I’m trying to create a function that traverses a dataset and removes characters from strings like ('? *'), and returns the already corrected column within the dataset. As an example of dataset: df =…