Printing data past .head() - printing

I am using this example to print zip codes given latitudes and longitudes: How do I get zipcodes from longitude and latitude on python?
The first answer got me what I needed. However, now I want to print all data and not just the first five rows (.head())
Even if I just change longlat.head() to longlat. I get this error: KeyError: 'postcode'
How do I get around this and get the function to print for all and not just the first 5?
I tried to change and get rid of the .head() part of the function but I get errors.

Related

Countifs function returns 0 in certain rows

I've recently started using Google Sheets for my new job and I need help with a little problem.
I created a function to compare a whole column of dates from a sheet with dates from another column on another sheet to filter the given count.
The code is as follows:
COUNTIFS('raw data'!$D$2:$D$952;">="&('2nd table'!$C$3:$C$52);'raw data'!$D$2:$D$952;">=01.08.2021";'raw data'!$D$2:$D$952;"<=31.08.2021")
raw data contains dates in column D. I've used 952 because that is the maximum range I can get. I've yet to solve how to implement this via named ranges.
2nd table contains the dates our employees started working at the company. I wanted to filter out the data that exists before their time at our company within raw data column D.
The function does return the correct value sometimes and sometimes it just returns 0.
If I boil down the function to just contain this:
=COUNTIFS('raw data'!$D$2:$D$952;">="&('2nd table'!$C$3:$C$52))
I get different values each time. I suspect that I cannot use the function in this way because the 2nd table got a different amount of rows to compare from.
How can I work around this issue if that's the problem and why does the function even work sometimes?

Google Sheets: Inside "COUNTIFS" statement check if value is contained in range

I want to count the number of customers who have a zip code in our supported zip codes list. In order to do so, I am currently comparing the zipcode attached to a user to zipcodes in our supported addresses tab. This is the best way I could come up with for the time being but it only works with a single cell as an input:
=COUNTIF('All Customers'!$E$2,"="&INDIRECT("SupportedAddresses!$D"&MATCH('All Customers'!$E$2,SupportedAddresses!$D$2:$D,0)+1))
The below function is the same as the above, except it's looking at a range instead of a single row. How do I get the below function to work like the one above? The one above returns 1 or 0 correctly while the one below always returns 0.
=COUNTIF('All Customers'!$E$2:$E,"="&INDIRECT("SupportedAddresses!$D"&MATCH('All Customers'!$E$2:$E,SupportedAddresses!$D$2:$D,0)+1))
Thanks in advance!
EDIT: I found a workaround but would still love to know how to deal with this in the future/why this is the case

Escaping parentheses in contact search API

I am trying to search for a contact with a phone number of the following format:
(XXX) XXX-XXXX
I tried the following query and get no results:
/v1.0/me/contacts?$top=10&$search="(XXX) XXX-XXXX"
I also tried it with URL encoded parenthesis and also get no results:
/v1.0/me/contacts?$top=10&$search="%28XXX%29 XXX-XXXX"
The only thing that worked for me is:
/v1.0/me/contacts?$top=10&$search="*XXX*XXX*XXXX"
However, with the last one I'm concerned that it could return bad results in some cases where there might be some other numbers in the wildcard positions.
Is there a proper way to do this search?
Have you considered using filter query instead of search, that way you might be able to scope the search just to the phone field.

Find Country Code from Phone Number

In my app , I am using phone numbers like +17896786788,+322657579849.
I would like to retrieve only the country code i.e, +1 or +322 by passing any phone number, that is I will send phone number and it will return the country code of that number.
Is there any API or anything available to get the country code from the phone number?
How can I find that?
I dont know about an API for splitting country code from a phone number,
But you can use this link to get all countries and their corresponding codes. Its a json file. You first parse all codes to an array from this json and then compare each element wth your phone number by using "range" funtion along with + symbol
Try it. U will get it.

Changing the case of formula output

I'm using a JSON call to insert the city for a zip but the results are in all caps. The zip is in C2. Can I use PROPER to initial cap the results of the formula at the same time as the call so I don't have to run the formula on a different column? I know this is probably beginner stuff but, I can't figure it out.
This is what I'm using. I want to run PROPER at the same time.
=ImportJSON(CONCATENATE("http://ziptasticapi.com/",C2), "/city","noHeaders")
Have you tried:
=PROPER(ImportJSON(CONCATENATE("http://ziptasticapi.com/",C2), "/city","noHeaders"))

Resources