Splitting rows in csv with comma separated values

I have csv file, which information (id and text) in column’s looks like in example below: 1, Šildomos grindys 2, Šildomos grindys, Rekuperacinė sistema 3, 4, Skalbimo mašina, Su baldais, Šaldytuvas, Šildomos grindys My desired output is to transfer ID to one row and relate it to its text (it’s for database). Because of csv… Read More Splitting rows in csv with comma separated values

How to center a select box in a cell table using HTML?

This may seem silly, but I’m a beginner here and I can’t wrap my head around this one: Fiddle <table class="table table-sm table-striped" id="dtable" style="font-size:0.9em"> <thead style="white-space: nowrap"> <tr> <th style="width: 17%" class="text-center">Link To File</th> <th style="width: 18%" class="text-center">Approval Status</th> </thead> <tbody> <tr> <td class="align-middle" style="word-wrap: break-word;min-width: 160px;max-width: 160px;text-align:center">2</td> <td class="align-middle" style="align-center"> <select name="D1" style="border-radius:… Read More How to center a select box in a cell table using HTML?

Python gender-guesser not able to evaluate gender names

I have a text file with a list of names: Aaron Abren Adrian Albert When I run the following code: import gender_guesser.detector as gender d = gender.Detector() file1 = open(‘names.txt’,’r’) count = 0 while True: count += 1 line = file1.readline() guess = d.get_gender(line) print(line) print(guess) if not line: break print(count) I get the following:… Read More Python gender-guesser not able to evaluate gender names

How can I iterate through object of objects data to fill angular table

I’m having a hard time trying to iterate data fetched from api through angular bootstrap table. From a first approach I was mapping the data to prsnl variable declared as prsnl: any and initialized in the function bellow: getAllPersnlValues(data) { return this.persnlService.getPersnl(data) .pipe( map((response) => response) ).subscribe((res) => {this.prsnl = res; console.log(‘prsnl’, this.prsnl)}); } In… Read More How can I iterate through object of objects data to fill angular table

Python: convert column containing string to column containing json dictionary

I have a Dataframe with columns that look like this: df=pd.DataFrame() df[‘symbol’] = [‘A’,’B’,’C’] df[‘json_list’] = [‘[{name:S&P500, perc:25, ticker:SPY, weight:1}]’, ‘[{name:S&P500, perc:25, ticker:SPY, weight:0.5}, {name:NASDAQ, perc:26, ticker:NASDAQ, weight:0.5}]’, ‘[{name:S&P500, perc:25, ticker:SPY, weight:1}]’] df[‘date’] = [‘2022-01-01’, ‘2022-01-02’, ‘2022-01-02’] df: symbol json_list date 0 A [{name:S&P500, perc:25, ticker:SPY, weight:1}] 2022-01-01 1 B [{name:S&P500, perc:25, ticker:SPY, weight:0.5… 2022-01-02… Read More Python: convert column containing string to column containing json dictionary