Data Sets#
- morningstar_data.direct.user_items.get_data_set_details(
- data_set_id: str,
Returns all data points for a given saved data set.
- Parameters:
data_set_id (
str
) – Unique identifier of a Morningstar or user-created data set saved in Morningstar Direct, e.g., “6102286”. Use the get_data_sets or get_morningstar_data_sets functions to discover saved data sets.- Returns:
DataFrame: A DataFrame object with data points. DataFrame columns include:
datapointId
datapointName
displayName
currency
preEuroConversion
sourceId
frequency
startDate
endDate
floatStart
floatEnd
startDelay
endDelay
diffStart
diffEnd
compounding
calculationId
annualized
annualDays
benchmark
riskfree
windowType
windowSize
stepSize
requireContinueData
fit
scalType
scalValue
scalPercentValue
timehorizon
- Examples:
Get data points contained in data set “0218-0450”.
import morningstar_data as md df = md.direct.user_items.get_data_set_details(data_set_id="0218-0450") df
- Output:
datapointId
alias
type
universe
datapointName
…
calcIsApplyIsraelsenModification
OS01W
Z0
text
Name
…
NaN
…
- Errors:
AccessDeniedError: Raised when the user is not authenticated.
BadRequestError: Raised when the user does not provide a properly formatted request.
ForbiddenError: Raised when the user does not have permission to access the requested resource.
InternalServerError: Raised when the server encounters an unhandled error.
NetworkExceptionError: Raised when the request fails to reach the server due to a network error.
ResourceNotFoundError: Raised when the requested resource does not exist in Direct.
- morningstar_data.direct.user_items.get_data_sets() DataFrame #
Returns all data sets saved by or shared to a user in Morningstar Direct.
- Returns:
DataFrame: A DataFrame object with all data sets. DataFrame columns include:
datasetId
name
source
shared
- Examples:
import morningstar_data as md df = md.direct.user_items.get_data_sets() df
- Output:
datasetId
name
source
shared
5447361
alpha
DESKTOP
False
5386429
Michael’s Search Ds
DESKTOP
False
…
- Errors:
AccessDeniedError: Raised when the user is not authenticated.
BadRequestError: Raised when the user does not provide a properly formatted request.
ForbiddenError: Raised when the user does not have permission to access the requested resource.
InternalServerError: Raised when the server encounters an unhandled error.
NetworkExceptionError: Raised when the request fails to reach the server due to a network error.
ResourceNotFoundError: Raised when the requested resource does not exist in Direct.
- morningstar_data.direct.get_morningstar_data_sets(
- universe: str | None = None,
Returns all Morningstar pre-defined data sets.
- Parameters:
universe (
str
, optional) – Investment universe code. Example: “FO”. Use get_investment_universes to discover possible values.- Returns:
DataFrame: A DataFrame object with Morningstar data sets. DataFrame columns include:
datasetId
name
- Examples:
Retrieve the Morningstar data set for the open-end fund universe.
import morningstar_data as md df = md.direct.lookup.get_morningstar_data_sets(universe="FO") df
- Output:
datasetId
name
0026-0020
Snapshot
0026-0447
Sustainability: ESG Risk (Fund)
…
- Errors:
AccessDeniedError: Raised when the user is not authenticated.
ForbiddenError: Raised when the user does not have permission to access the requested resource.
InternalServerError: Raised when the server encounters an unhandled error.
NetworkExceptionError: Raised when the request fails to reach the server due to a network error.
ResourceNotFoundError: Raised when the requested resource does not exist in Direct.