1
$\begingroup$

I am relatively new to mathematica, and sorry if this question is too simple. I am trying to export weatherdata to a csv or xls file.

data = WeatherData["Chicago", "Temperature"]    
Export["C:\\***filepath****\\weather.csv", data, "csv"]

When I open the file with excel, in the A1 cell I get "Quantity[26.1" and in the B1 cell I get ""DegreesCelsius"]"
I want just the 26.1.

What am I doing wrong here?

$\endgroup$
1
$\begingroup$
data = WeatherData["Chicago", "Temperature"];
degrees = QuantityMagnitude[data]
Export["C:\\***filepath****\\weather.csv", degrees, "csv"]
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.