Categories
Mastering Development

Find and highlight selected consecutive cells from one column in other columns

I would like to know if there is any formula/conditional formating I can use, where I can select some consecutive cells in one column and this formula will find and highlight the same cells in other columns. For example, as you can see in the image below I have selected the cells 2-0 1-0 n12 […]

Categories
Mastering Development

Error of “TypeError: unsupported operand type(s) for /: ‘list’ and ‘int'”

I have an error of the following below. I understand that python does not allow operands for different data types such as ‘lists’ and ‘int’ However my ‘h’ variable is not a list as i have simply initialized it as such: import numpy as np import matplotlib.pyplot as plt v0 = 1 # Initial velocity […]

Categories
Mastering Development

How to get words matches with it’s count using pandas

i have 2 Dataframes like set1 = [‘a’,’b’,’c’,’d’,’e’,’f’,’g’,’h’,’i’,’j’] set2 = [‘a’,’b’,’b’,’c’,’c’,’f’,’h’,’j’,’k’] df1 = pd.DataFrame(set1, columns=[‘name’]) df2 = pd.DataFrame(set2, columns=[‘name’]) i want to compare these 2 Dataframes without forloop and get a output like df3 = [‘a=1′,’b=2′,’c=2′,’f=1′,’h=1′,’j=1’] which way i can use for getting this output any examples .?? here i want only the items from […]

Categories
Mastering Development Software

A language design with variable qualifier

I am planning to design a programming language. One challenge I face with is whether it is a good idea to have const as a variable qualifier instead of a type qualifier. For example in C++: const int x = 5; means that x is of type const int. While in my language, H++, the […]

Categories
Mastering Development

How to create a table using a list of lists

I’m trying to write a file where you have 2 rows, with the first row being numbers and the 2nd row being letters. As an example, I was trying to do this with the alphabet. list1=[‘A’,’B’,’C’,’D’,’E’,’F’,’G’,’H’,’I’,’J’,’K’,’L’,’M’,’N’,’O’,’P’,’Q’,’R’,’S’,’T’,’U’,’V’,’W’,’X’,’Y’,’Z’] list2=list1+list1 abcList = [[],[]] for i in range(len(list2)): i+=1 if i % 5 == 0: if i>=10: abcList[0].append(str(i) + […]

Categories
Mastering Development

Creating a hierarchical dictionary with nested lists or dictionaries from 2 lists

I have 2 lists. The first has number denoting what part of the hierarchy that the value in the other list at the same index belongs. I am trying to get dynamic code that could theoretically go to any number of steps. The first 3 work correctly but when I had more steps to the […]

Categories
User Help Web Apps

Google sheets: How do I convert rows with 45 columns into 15 separate rows, each with 3 columns?

I am working with a google sheet that gets data from an email parser. Each time an email comes in, a single row is created, and fills in these columns: B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, […]

Categories
Mastering Development

How to detect a certain pattern in subsequent lines and appen/prepend text to it in python 3

First of all I’d like to thank everyone who’s going to give a hand. I’d need some help in writing code with python3. Briefly, I’m trying to write a script to clean up gcode files generated with Cura. The difficulty for me is to find a way to tell the program to append or prepend […]

Categories
Mastering Development

Is there a method to convert a letter into it’s index in a tuple in python?

What I mean by the question is if i had: alphabet:["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"] and received an input of "a" I would get back an index of 1, or z to get back an index of 26, from the tuple’s index. I’m wondering if there is an easier way instead of using a dictionary. So like if I […]

Categories
Mastering Development

How does Python’s random.shuffle() alter the value of a list without returning anything and is this something any Python coder can do as well? [duplicate]

I just noticed I wasn’t getting a return from random.shuffle(). I realised this makes sense as you would logically want to work with the original list unless specified otherwise. >>> import string >>> import random >>> letters = list(string.ascii_lowercase) >>> print(letters) [‘a’, ‘b’, ‘c’, ‘d’, ‘e’, ‘f’, ‘g’, ‘h’, ‘i’, ‘j’, ‘k’, ‘l’, ‘m’, ‘n’, […]