Questions tagged [append]

To append is to join or add on to the end of something.

0
votes
2answers
24 views

Pandas (Python) - Problem appending list to empty dataframe with column names

I am trying to append a list looking like this myList = ['2018-01-12', 'MMM', 'BUY', 42, 236.5229] to an empty dataframe (with "header" / columns names). To create the dataframe i've done the ...
0
votes
3answers
27 views

how to fix this error 'numpy.ndarray' object has no attribute 'append' in the code below

Returns this error: 'numpy.ndarray' object has no attribute 'append' class1 = np.array([]) #creates 2 empty arrays class2 = np.array([]) #yhat_tr is a vector(1 column, 100 rows) = numpy.ndarray for ...
-1
votes
0answers
61 views

append data between file without rewrite or replacing?

I have some problem with File Stream. First how can I append data in between file without rewrite or replacing? I don't want to use record. I don't want to load file in String List and after change it ...
0
votes
1answer
12 views

Replace string with spans containing each character

I would like to replace the content of an h1 element containing a character chain with the same chain but each character should be wrapped in a span. That seemed easy enough to me, but I maybe ...
0
votes
3answers
31 views

Serialization of ArrayList and appending new ArrayList

I can serialize ArrayList for the first run. It stores the customers arraylist at the first time when the data.ser file is created. The other times it doesn't append new ArrayList of customers. ...
0
votes
0answers
7 views

.empty() method changes the number of results return

I'm extremely green to coding and need help with a technical issue. I'm using Ajax to submit a query that should return 10 results. It does that, however when I enter the empty method to clear the div ...
-3
votes
0answers
20 views

What should I append() in order to achieve a list of links I desires? with or without “num” variables? [on hold]

I am trying to make a list of looping via range() and append(). I am kinda stuck on what to put in the append() in order to acquire all the pages I want. page_begin = int(input("where starts?")) ...
0
votes
0answers
47 views

Appending Incorrect Value in For-Loop and If-Statement

I'm writing a for-loop to create a list of characters ('e' for edible, 'p' for poisonous) from a binary list (1 corresponding to 'p', and 0 corresponding to 'e'). When I try to do this, everyone gets ...
0
votes
1answer
12 views

Need to add array elements to list. Trying to use “tolist”, “extend”, and “append”, but not successful

I'm trying to create a list that has image_id then several prediction percentages. The prediction percentages (yhat) are in a np array. I thought that using "tolist" then "extend" then "append" ...
0
votes
1answer
17 views

Splunk query using append

I have a query that calculates Batch logs from different time slots and shows the output using append command.But in the first time slot i'm getting a batch log which is not there in 2nd timeslot of ...
0
votes
1answer
41 views

How to append to the same location in div every time?

I am creating an app where you can design a map with images, then save it to a database, then have the database recreate the map in another window. It does this by saving the top and left locations of ...
0
votes
2answers
37 views

Dropdownlist does not appear when append duplicate div in MVC

I have a div of Spouse Information. When clicking on add button I append duplicate div below the first. But the Dorpdownlist for HomeDistrict does not appear in the append div though level and other ...
0
votes
2answers
30 views

How can I append a value replacing multiple elements in a list?

I'm trying to make a search system that finds the search keyword containing mutiple ANDs, ORs, and parentheses. What I'm trying to do now is replacing the parenthesis with boolean values. So if I ...
0
votes
2answers
49 views

I need to append a list into another list (specific issue)

This is my code: files = open('clean.txt').readlines() print files finallist = [] for items in files: new = items.split() new.append(finallist) And since the file of text is too huge, here is an ...
1
vote
1answer
17 views

I need help appending words from a text file while creating a new list in list every time there is a new document

I've a text file containing movie reviews where every new line ('\n') represents a new movie/ new document. However, I've trouble appending them into a sequence as follows: If given example text ...
-1
votes
3answers
30 views

The error is saying : “list.appendChild is not a function” [duplicate]

function addList(value) { const list = document.getElementsByClassName("list-div ") var div = document.createElement("div"); div.classList.add("list-new"); div.innerHTML = `&...
0
votes
1answer
54 views

Ho to append a list to a dataframe?

I am trying to read an ASCII file line-by-line into a Pandas DataFrame. I wrote the following script: import pandas as pd col_labels = ['Sg', 'Krg', 'Krw', 'Pc'] df = pd.DataFrame(columns=...
1
vote
0answers
28 views

Append html table on Button Click

I want to append html table in a div on button click. I have the following Code but Its is not being fired. Can anyone help C# Code html.Append("< table >"); html.AppendFormat("&...
1
vote
2answers
42 views

Append function for C with dynamic memory allocation

Following this question, I'm trying to modify the code provided in this blog post to create an append function using dynamic memory allocation. This is what I have so far: #include <stdio.h> #...
1
vote
1answer
43 views

SICP/Scheme: Procedure that accepts a list of pairs and an element, returns a list of pairs

I'm having some issues with this problem I've been given. It's not homework, it's actually a problem I've encountered at a test and to deepen my understanding I would like to solve it successfully. ...
0
votes
1answer
21 views

Force append in SAS to save missing data

I am trying to save a vector named ez product of some matrix calculations based on a group variable named ID_bloque. For each ID_bloque value my code computes a vector called ez and append it in a ...
1
vote
3answers
26 views

Python: How to scan .txt and pull out specific word into list

I want to scan a .txt file line-by-line for specific words. When the words are found, I want to add that particular line into a list. Any help would be appreciated! The code below prints an empty ...
0
votes
1answer
35 views

how to add new lines to windows hosts with a batch file

i know this was already discussed but i didn't find what i needed. I need to add new lines at the end of the hosts window file but, first i need to check if these lines already exist and than adding ...
0
votes
3answers
32 views

Python & Arrays : Search and Add Missing Element in Array

I have a messy array; every element has subelements and every subelement has sub-subelements. My array is; myComplex=[[['03.04.2019', 'Jack', '7']], [['26.03.2019', 'Micheal', '5'], ['26.03.2019', '...
0
votes
2answers
29 views

how to access li text to create new list with javascript

I cannot get this function to work correctly. it only list the first word of foodlist (by default is food) and if i select more than one item from foodlist it does not create a new li for each ...
0
votes
1answer
28 views

How to add checkboxes to a list using javascript

i am having problems adding checkboxes to my list as it is generated. i want to be able to check or uncheck items that are added using the addToList function. I have tried playing around with the ...
1
vote
5answers
58 views

How do I append a lambda to a list in python?

I am trying to make a program that creates a list of lambda functions of the format y=mx+b, where 'm' and 'b' are predetermined values My overall goal is to implement a function that Takes a ...
1
vote
1answer
35 views

python append 2d list not work as expect is it a bug?

I encountered an issue with appending a list to a 2D list. In the code below, if I change b.append(a) to b.append([*a]) everything works! But aren't a and [*a] the same? a = ['1', '1', '1'] b = [] ...
0
votes
1answer
30 views

I want to add triplets inside a 2D array

I have a numpy 2D array like this one [[[1,1,1],[5,7,3]],[[1,4,5],[8,3,9]]] and I would like to add a triplet [0,0,0] to only one of my columns. I tried the function np.append this way: np.append(...
0
votes
2answers
21 views

Keyup Event Handler in dynamically added elements

"Total" input doesn't work in the added elements! It works only in the first row! Any help please? .........................................................................................................
0
votes
1answer
16 views

Power Query - Appended Queries pulling from same folder - Need only 1 query to run on new files

I have two queries created in Power Query that pull data from the same folder and are appended. The reason for this is because that folder contains many files with two distinct data structures, one is ...
0
votes
1answer
56 views

How to copy table row and append after modify input value

I am trying to copy a table row modify input according to checkbox input of modal and append new row I have a table of item category. If I click plus button a modal appear with some checkbox of ...
-2
votes
2answers
62 views

Iterating over three variables

Ok, this is going to be really long. I am trying to calculate water levels in an analytical solution in a polar grid. It depends on both r and theta as well as this variable j. What I am trying to do ...
0
votes
0answers
6 views

Jquery Datatables append “Custom” option to dropdown and display input box in it's place

I've been piecing this code together through help from SO and Datables.net. Huge shout out to @YevgenGorbunkov from SO and kthorngren from Datatbles for all the help. http://jsfiddle.net/crashvector/...
-1
votes
0answers
7 views

Append Price Without $ To Price Schema Content Attribute

I'm trying to append 7.07 (without currently symbol) from: <p class="regular-price">$7.07</p> to the content attribute here: <meta itemprop="price" content="7.07 Here" />.
0
votes
0answers
25 views

Appending and Embedding SVG to HTML Element problem

I am currently creating a tooltip for a D3 generated chart. Below is a snippet of the code reduced to include just the tooltip problem. If you set up a tooltip as a Div and append it to the DOM via D3 ...
0
votes
1answer
33 views

How do I count occurrences of a word in a csv file using python?

So for my assignment I was giving a csv file and am supposed to print the number of people in the file, the amount of each type of email (.jp , .uk., etc.) and print the last names in the file that ...
0
votes
1answer
19 views

Python - Extend data frame by differences for numeric columns with split by unique IDs

I would like to add calculated differences to existing dataframe in reference to IDs. Differences were saved to separate data frame. Actual dataFrame has the following view df1: Id Col1 Col2 ...
0
votes
0answers
31 views

Why can I print this list of lists, but only append all up to and not including the last element of each iteration?

I can print the following list of lists fine, but when I append to an empty list, it skips the last on each iteration or gives me an index out of range error when I add one more. This works: ...
0
votes
1answer
22 views

Image duplicates itself when using appendParagraph in Google Script

I wrote a script to add an image from my Google Drive and some custom text to a Google Doc. (I got the image insertion code from here). The resulting document is created ok, but my image is added ...
0
votes
1answer
25 views

Liquid (Shopify) - Append String is Empty

In Shopify I am trying to build a string of the current tags in my shopify store. If I am on the page: mysite.com/collections/all/tag1+tagC+tag4 I need to be able to get the current tags as one ...
0
votes
0answers
31 views

How to add a new name on a list of names from a txt file, and then add all names and display that number of names in a string

1) Create new console application, with Visual Studio that you will call consolehw. 2)You will create a text file with that will have a list of at least 10 names of people. This file should be called ...
-2
votes
0answers
31 views

c programming help to append and update nodes in linked list

Program Basis: A hotel owner would like to maintain a list of laundry service requests by the guests. Each request was stored with the room number, the guest’s first name, last name, and number of ...
0
votes
1answer
23 views

How do I create a CSV file with a dictionary and only using variables as keys and values

I need to do some real estate market research and for this in need the prices, and other values from new houses. So my idea was to go on the website where i get the information. Go to the Main-Search-...
1
vote
2answers
46 views

How to append or concat strings in Javascript?

So I'm trying to add to a string and it shows up as empty. var DNA ="TAG"; var mRNA = ""; m_RNA() function check(a, b, string) { if (string = a) { mRNA.concat(b); } } function m_RNA(){ /...
0
votes
1answer
61 views

JSON data appears in console but is coming up as `undefined` in browser

I have some JSON data where some elements share values, so I reduced that data into new JSON where the values are correctly nested: (4) [{…}, {…}, {…}, {…}] 0: SameGroup: Array(3) 0: {...
4
votes
2answers
51 views

How to append multiple dataframes with same prefix in python

I have multiple sequential dataframe like this: df1 = pd.DataFrame( [['tom', 10], ['nick', 15], ['juli', 14]] , columns = ['Name', 'Age']) df2 = pd.DataFrame([['tom', 10], ['nick', 15], ['juli', 14]]...
0
votes
0answers
28 views

How to get the value of a textbox element after prepending a div?

I have tried to get the value of a textbox that I will add later via function prepend after all HTML are loaded. I click a button to submit the form, but It can not get the value of the class ...
-1
votes
2answers
21 views

Why is this appending all the previous ouputs to the file?

I'm working on my implementation of the cat linux command. Whenever i pass '>' as an argument followed by a file, it is supposed to append everything that was passed as an argument before the '>' to ...
3
votes
3answers
52 views

Append the date from the first line of text file to the beginning of each other line

I am trying to append the first line of text (the Date) to the beginning of each line in the rest of the text file. Can anyone help ? I'm using a bash to extract the data into the text file displayed. ...

http://mssss.yulina-kosm.ru