Posts by Luciano Amaro • 85 points
9 posts
-
0
votes0
answers80
viewsQ: How to return materials from a product or product levels with PL/SQL
I have a table that contains products and each product has other products that are used to manufacture. The products that are used to manufacture the parent product, can also be manufactured and…
-
0
votes1
answer1593
viewsQ: Convert column to string where have pandas null values
How do I convert a column to string every time I try to do `df['COL1'] = ['COL1'].astype(str)` where there are nulls, pandas convert to string "NAN", have some way around this problem?…
-
0
votes1
answer1123
viewsQ: How to get only the records not duplicated with pandas
How would you get only the un-duplicated lines of a dataframe? Without them being single records, so df.unique() would not fit here. Only the ones that exist 1 same. I tried that way, but I don’t…
-
2
votes1
answer517
viewsQ: Extract phone number with API in Python pandas
I have an API that extracts the phone number. It works as follows. By passing a number on it, returns me 3 variable type string containing phone with country code, type if it is cellular or fixed…
-
0
votes2
answers778
viewsQ: Python pandas: Drop rows with duplicate column and another column with null value
I would like to drop in lines where the column 1 is duplicated and column 2 is null. I expect an output that way Col1 Col2 A 123 A NaN B NaN B 456 Exit Col1 Col2 A 123 B 456 I tried to do more or…
-
1
votes1
answer507
viewsQ: I cannot list the unique values of the dataframe
I have a dataframe with 1 million lines, I know that to list the unique values would be df['Col'].unique(), but I can’t see them all, because this method shows only the first and last lines, leaving…
-
1
votes1
answer1587
viewsQ: sha1 encryption with python
I need to generate a sha1 encryption of a string value from a JSON file, but I’m not getting it. Does anyone know where I’m going wrong with my code? The code opens the json file, takes the String…
-
2
votes1
answer172
viewsQ: Loop Replace all string characters by python list character
What I want to do is take a string and for each character of the string walk type 3 positions back in the alphabet and replace in the string or create a new string Ex string = 'abcd' walking 3…
-
-1
votes1
answer441
viewsQ: Save API request response as JSON file
When making a request to the URL(API), the result is a JSON. How can I save this JSON to a.json file locally on my machine? My code so far: var xhr = new XMLHttpRequest(); xhr.open("GET",…