Best Of
Re: Python
It depends if the index has a name or not. When you convert the Index to a dataframe the Index Name becomes the column name. I'm not certain how Domo would handle having an empty column name, likely it wouldn't like it so you might want to set the name on the index first if it isn't already set before converting it to a dataframe or you can rename the column on the dataframe after you've converted it.
index_o = original.index index_o.name = 'My Column Name' write_dataframe(index_o.to_frame())
Alternatively
index_o = original.index df = index_o.to_frame() # must use a list with the same length as the number of columns in your dataframe df.columns = ['My Column Name'] # alternatively you could use the rename method on the dataframe object. write_dataframe(df)
I don't have access to the Python tiles in Domo so this is based off my experience with the Python language itself.
Domo Phoenix Font Family
There's no option to include font family with the domo phoenix library, I know it can be done with css. Does anyone have an example they can share of how they've added font family to a chart from domo phoenix? thanks.
Re: Summary number for non-distinct rows
Don't JOIN Budget to Actuals. APPEND Budget to Actuals.
By Appending you'll avoid duplication and can avoid 'crazy math'.
Re: Is it possible to switch a data set to a different dataflow?
If the resulting dataset isn't massive, you could just pass the completed new SQL flow as an input set in the current ETL and keep the same output step that's powering your cards.

Re: How can I set default page filters for each of my dashboards?
Page filters is not the same as securing sensitive data.
Have a look at PDP policies, https://knowledge.domo.com/Connect/Personalized_Data_Permissions_(PDP) , for properly securing data.
Any other method is literally a case of WHEN someone accidentally gets shared the wrong content, because that's all that's stopping people from seeing everything.
Re: Trying to Split a Text Field with Time data (HH:MM:SS) into usable data
contact your CSM / Domo Account Representative or support@domo.com and ask them to push the Magic 2.0 beta. it's free and available if you ask for it.
Re: Can we change Legend name in cards for YOY views and normal views ?
Because of leap years and not every year being 365 days I'd recommend using a 1 year or 2 year interval instead.
case when date >=currentdate() - interval '1' year then 'this year' when date >= currentdate()- interval '2' year then 'two years ago' ... end
Re: How to get aggregated data without losing rows
@user094816 you can do this very easily in the ETL. See example in the image below.
Start with your dataset and then add a Group by tile and do a count of your column you want counted.
Add a join tile and connect it to your original dataset and your group by tile. Join on the appropriate key.
This will keep all your rows and show the total from the group by tile as well.
Re: Show x-series minutes with no data.
What you'd need to do is have a dimension table of all times within a given day on a minute by minute basis. You can then utilize a DataSet View (instantly updates when underlying data updates. Might still be in beta. Talk with your CSM) to left join your data to this time dimension table. Then you can graph by the time for the last 60 minutes which would have nulls for the times where you don't have any data and force Domo to display those times.
Re: Python
Domo spins up a local environment / container for you to execute python code in. The only thing that Domo really controls is the read_dataframe and write_dataframe.
If you take out the Domo aspect you can think of read_dataframe and write_dataframe similar to read_csv/write_csv or read_sql/write_sql. The only difference is the container will export the data from the Domo dataflow into a pandas dataframe instead of reading the dataframe from a CSV file or SQL query result.
Regarding your error it's explicitly complaining about how you're attempting to write a dataframe but aren't passing in a dataframe object. You're passing in a pandas Index object instead (which you got from the .index
property on your original dataframe). You need to convert your Index to a dataframe first. You can do this with the .to_frame()
method on your index:
write_dataframe(index_o.to_frame())