Categories
Mastering Development

dates in a CSV format

I’m trying to get dates and times into a CSV for a period of over a couple of years. I have some example data below: date,time,,, 26/03/2020,07:00,,, 26/03/2020,07:30,,, 26/03/2020,08:00,,, 26/03/2020,08:30,,, 26/03/2020,09:00,,, 26/03/2020,09:30,,, 26/03/2020,10:00,,, 26/03/2020,10:30,,, 26/03/2020,11:00,,, 26/03/2020,11:30,,, 26/03/2020,12:00,,, 26/03/2020,12:30,,, 26/03/2020,13:00,,, 26/03/2020,13:30,,, 26/03/2020,14:00,,, 26/03/2020,14:30,,, 26/03/2020,15:00,,, 26/03/2020,15:30,,, 26/03/2020,16:00,,, 26/03/2020,16:30,,, 26/03/2020,17:00,,, 26/03/2020,17:30,,, 26/03/2020,18:00,,, 27/03/2020,07:00,,, 27/03/2020,07:30,,, 27/03/2020,08:00,,, 27/03/2020,08:30,,, 27/03/2020,09:00,,, 27/03/2020,09:30,,, […]

Categories
Ask Mathematics

Initial permutation

I would like to know how to identify this problem. In binary form: 0000 0001, 0010, 0011 and then it permutes to 1100,1100,0000,0000 What’s the logic behind this? [photo][1]https://i.stack.imgur.com/cNyzZ.png

Categories
Development

can’t make call function to make a quit box appear in pygame

I’m trying to make it if you press ‘esc’ a quit box appears with the text “Do you want to quit?” on it. If the user clicks ‘y’ the program ends. I think the first problem may be in the quitBox function but I don’t know at all what is wrong in it. To me […]

Categories
Development

Two-Way Repeated Measures ANOVA: Error in lm.fit()… 0 non-na cases (rstatix)

I am trying to run a Two-Way Repeated Measures ANOVA using the R Statix package based on the description from here however I am running into the subject error with my dataset. The data consist of 10 replicate biomass measurements recorded at each of 8 Locations across 5 months (10 reps x 8 locations x […]

Categories
Development

Renaming Sub Column names and then creating a data frame using renamed column in R

I am having a tricky dataset3922327258060dat.txt for which I have to create a function to read three columns. This dataset is having multiple columns, out of those columns I need to change name of 3 columns (Date, HrMn, Slp) to (Date, Time, AtmosPressure) and then make a data frame of these 3 columns. BUT the […]

Categories
Development

create tuple of nth element in the cartesian product of input vectors

I have a python function which returns the nth-element in the cartesian product of a number of input arrays def prod(n, arrs): out = [] for i,arr in enumerate(arrs): denom = numpy.prod([ len(p) for p in arrs[i+1:] ], dtype=int) idx = n // denom % len(arr) out.append( arr[idx] ) return out This works great: a […]

Categories
Development

Excel Macro recording “Too many line continuations” error

I am writing a macro that, besides doing other things, should filter a long column of data that consists of positive and negative numbers. The numbers could be any value, and not necessarily all values between -4095 and 4095, but the entire column will vary in length up to over 800,000 rows. I want to […]

Categories
Development

X axis not picking correct column for plot in pandastable

I have two column dataframe and i want to plot the data as already plot function is there in pandastable . How I can set the x axis column in pandastable plot. I am selecting two columns one as x axis & another as y axis , xaxis i want to be string time and […]

Categories
Development

Python: Convert list with string sub elements to a normal list

This is for Python. I want to take a list of strings and split each string out into it’s own element with the comma as a delimiter. Then turn that into a list of sublists while keeping the first element a string and the next two elements ints. What I have: myList = [‘one, 0650 […]

Categories
Development

Removing sublists where index is duplicated

Hello I’m trying to sort through a nested list and remove sublists based on its [0][0][0] index. I can get it to work if the rest of the list is also identical, however, with the first index ([0][0][0]) the same and the rest of the sublist ([0][0][1] for instance) is different to the constant, it […]