I have many text files include data as follow: 350.0 2.1021 0.0000 1.4769 0.0000 357.0 2.0970 0.0000 1.4758 0.0000 364.0 2.0920 0.0000
Is there a way to select multiple columns that are not adjacent and combining several methods? test dataframe: test = pd.DataFrame(np.random.rand(3, 9),
I have a DataFrame with 5 columns, where the column i need to aggregate is of a string, and has NaN values. I tried replacing the nan values with 0 and then con
I have a dataframe with a column of IDs and a column of values - each ID is associated with two or more rows. When any subset of values within a given ID meets
I'm executing a query on IBM DB2 server with ibm_db_dbi. Here is my query: connection = ibm_db_dbi.connect(hostSettings, '', '') ret = pd.read_sql(query, connec
I decide to simplify my post and replace images with code which has the same structure (and problem) inside and everyone could 'copy-paste' this example to try
How do I get the first column, then add another slice? For example: import pandas as pd df = pd.DataFrame(pd.np.random.rand(6,6), columns = list('abcdef'))
I connected to a sftp and got a list of files successfully: ssh = paramiko.SSHClient() ssh.set_missing_host_key_policy( paramiko.AutoAddPolicy
I am working on a data processing script that does some basic calcs from data files and sorts the data. The last piece to the puzzle is identifying if the next
I have a df, A B one six two seven three level five one and a dictionary my_dict={1:"one,two",2:"three,four"} I want to replace df.A with my_di
df.to_csv(output_file) is supposed to write the content of a DataFrame to a file. While the function is working for 99.9% of the file in my directory, there is
I am trying to build the following model but am getting this error when I am finally training the model and trying to get it's accuracy. It gets stuck when I am
I would like to ask a question regarding converting datetime only to time. I have values 'Date Created" that include Dates and Times in one column and I would l
I have this as the ID numbers: "00456, 0000456, 567, 00567" in a dataframe called "test". I created a dataframe where it has the IDs with leading zeros in a col
I have two data frames df1 and df2, where df2 is a subset of df1. How do I get a new data frame (df3) which is the difference between the two data frames? In o
How can I open a .tsv file in Jupyter. The data is stored under C:/User/anna/. This is my code: import pandas as pd df=pd.read_csv('C:/User/anna/train') Bu
I'm trying to create duplicate rows during a dataframe on conditions. For example, I have this Dataframe. students = [ ("a", "Ursula"), ("b", "Hayfa, Ma
I have a data frame like this: A B C Date1 Time1 Value1 Date2 Time2 Value2 abc def ghi 01-01-2000 15:00:00 100 01-01-2000 19:00:00 110 There are duplicate col
I am currently stuck trying to extract a value from a list/array depending on values of a dataframe. Imagine i have this array. This array i can manually create
I am currently stuck trying to extract a value from a list/array depending on values of a dataframe. Imagine i have this array. This array i can manually create