Get all the data in a cell in Sframe - python-3.x

I am supposed to find data related to a particular value given for a column. I am given the corresponding value in col1 and need the relevant data from col2. I ran the following code using turicreate.
sf1[(sf1['column_name'] == 'corresponding_value')].show()
After this, I get the "Materializing SFrame" section with the data in it. The graphs highlights show a small part of the required data from col2 but not all of it. I need all of the data. How do I print it?
(I can't attach screenshots of the incomplete cell data as this from a coursera assignment and I wish to avoid any academic dishonesty flags.)

try this: (num_rows = any number of rows you want to see)
sf1[(sf1['column_name'] == 'corresponding_value')].print_rows(num_rows=100)

Related

How do I sum all the columns with the same header into one column in excel?

I am using a football dataset where I have changed all the countries to specific geographical areas in their column headers. What I want to do is I want to add up all the columns with the same geographic value with all the values added up.
This is how my data looks like:
The value of #players should still remain the same after condensing the data. I tried using the data function, but I could not figure it out.
My output should ideally look like a column with all the EUs added up, the AFRs added up etc.
It's actually unclear as to exactly what it is you're trying to do.
Here is an example use of SUMIF that addresses one possible interpretation:
=SUMIF($B$1:$E$1,F$1,$B2:$E2)
And here is an image showing how and were that formula would be used in this sample table:
If this doesn't address what you're aimed for, could you make an effort to do as I have done and show a small sample with the expected results.
I was able to solve it using the SUM function.
I used SUM(C2,C6,C7....) every column that had an EU in it and did the same for the other headers.

SUMIF with Index and multiple match criteria with Dynamic range

enter image description here
In the above problem, I am trying to create a dashboard of Brands Category wise.
The formula i am trying is. THis is in google sheets.
=INDEX($A$1:$F6,ArrayFormula(MATCH(A$12&B12,$A$1:$A6&$B$1:$B6,0)),Match(to_text(C$11),$A$2:$F$2,0))
THis returns only 1 value . But I would like to get a sum of BrandA, Catgory1 both in Nos and Pcs. How do I go about doing it? Somehow, not able to work with SUMIF. what is best suited?
Actually trying to create a dashboard for Month wise Sales/Purchase data like the link below. Any better way of doing in?
https://docs.google.com/spreadsheets/d/1047uWOrOqkW3L_1hoKh-MaY-O0_CZC0WiqmV8HZqk6o/edit?usp=sharing
Raj, if I understand your question, the following formula might provide the result you want.
=QUERY(Data!A1:F,"select A,B,sum(D),sum(E),sum(F)
where A<>'' group by A,B order by A,B
label sum(D) 'Apr',sum(E) 'May',sum(F) 'June' ",1)
This queries your data, groups it (and sorts) by brand and category (ignoring the Unit type) and sums the values. It also modifies the header text for the three summed columns.

Return the value in the first non-empty cell in the column directly to the left and going upward

I'm all new to VBA and have mostly been trying to modify code after recording macros, so it's all pretty basic and the approach might not be as elegant as some of the stuff I've seen on here. So here we go.
I have coded (by brute force) my data to be arranged like a CAD design tree view with parent products/assemblies and constituent sub-assemblies/parts.
Column E contains Level 0 top assembly Part Number
Column F contains Level 1 items Part Number
... etc all the way to ...
Column M containing Level 8 items Part Number
As an example, cell G112 contains ASSY1; cells H113 to H134 contain its constituent items.
I would like to display in a new column (i.e. Column O) the value of cell G112 (ASSY1) for each of its constituents. So O113 to O134 would show the value of G112. That would need to be applied to every single level of the assembly.
I'm not sure I'm making much sense do please have a look at the picture linked below, it speaks a thousand words. I've highlighted and colour-coded the result I would like in column O.
ADDENDUM - To clarify things:
I don't know how else to explain my request but to post a simplified version of my original picture.
SIMPLIFIED EXCEL TABLE
.CSV available here WeTransfer
A very useful tool to retrieve VBA code for determined action is the macro recorder, in the ribbon, Developer -> RecordMacro, perform you action and stop recording and then you can check the code generated for the actions you recorded. Its not the cleanest code but you can find there the lines of code for the specific actions you want. Once you step into a one concrete problem with the code you tried, you can then ask for help regarding something more concrete, more than expecting that someone will code that for you.
Anyhow if you want someone to try to solve your problem, you need to post the table with the accessible data instead of the image, for the person whoever tries to approach your problem to have the data available.
Hope that helps
Here's the answer I got from somewhere else if anyone is interested:
Formula in Cell O3:
=IF(C3=0,"N/A , ALREADY TOP LEVEL",INDEX(D$2:D2,AGGREGATE(14,6,(ROW(D$2:D2)-ROW(D$2)+1)/(C$2:C2=C3-1),1)))
Copy/Paste down in every cell in column O

Excel 2010 Lookup and Offset

Sorry this is a basic question but will try to explain clearly.
I have two worksheets. One a summary and the other that holds the raw data. In the summary tab in cell A1 I have a drop down with each day dd/mm/yyyy.
What I want to do is to find the same date in the raw data table and then look down a set amount of columns and then look across a set about of rows and return that as my value in the summary sheet.
Been trying but can only get to look down or across a column or row and not both.
I think I didn't get enough sleep last night!
Thanks in advance for any help at all.
Without an exact example to apply this to, I'm guessing what you want is offset match match.
As per the formula on the link, you want:
= OFFSET ( starting point , MATCH ( vertical lookup value, left hand lookup column excluding starting point , 0 ) , MATCH ( horizontal lookup value , top header row excluding starting point , 0 ) )
So, if I'm understanding correctly, you have a dataset that looks a bit like this:
Below the data I have example of items you want to find. This probably isn't the cleanest way to do this, but say you want the "hit" column for Operation 2 on 03/07/1989, then it would be:
=OFFSET(A1,MATCH(A10,A1:A5,0)-1,MATCH(A9,A1:H1,0))
This will return "0.81544".
To get the right data, you'll need to mess about with the - and + at the match formulas, and without seeing your data set it's hard to get you exact examples, I hope it helps though! I had to modify it slightly due to the fact I believe that your top row will include the dates as well as the column headings for each. Going through the linked guide should help you plenty to tailor it to your needs.

Loading multiple rows of column to store as qvd

I'm trying to load this table and store it as qvd. But the problem is I don't want to default header to appear in cell which only show header name in second row not first row. I also like to store A,B,C,D as Alphabet Group and avg score as another value. I have tried using crosstable and load inline but failed.
Your help is much appreciated.
Crosstable is the way to go. You should calculate the average in the frontend.
If you can't get the crosstable working. Build the table manually.
It should have 3 columns (Subject, Alphabet group, score) and look like:

Resources